I'll start by saying I have very limited knowledge of Profound and JS.
I have converted a widget from an output field to an hyperlink.
I'd like to set the 'checked value' of a checkbox widget, based on the 'onclick' function of the hyperlink.
How do I do it ?
Here is what I tried:
pui.set(I_2_2,"1");
pressKey("Enter");
Thanks
Max
Setting Checkbox 'Checked value'
-
- New User
- Posts: 5
- Joined: Tue May 08, 2018 9:14 am
- First Name: Max
- Last Name: Buda
- Company Name: DSC Logistics
- Phone: 8473906800
- Address 1: 1750 S. Wolf Rd
- City: Des Plaines
- State / Province: Illinois
- Zip / Postal Code: 60018
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Setting Checkbox 'Checked value'
A checkbox has properties called "checked value" and "unchecked value" that control the value that is inserted in the underlying 5250 screen and sent back to your application. For example, a lot of 5250 applications had fields where you might type Y for Yes, or N for No. If you used Genie to change that into a checkbox, you'd set the "checked value" to Y, and "unchecked value" to "N", so that the underlying program would still get the original values.
When you want to set it programmatically, you'd also use those values with the pui.set() API.
Also when calling pui.set() the "id"parameter should be in quotes. So your code would look something like this:
That's assuming that your checked value is Y (which it may not be, I'm not familiar with your application) and that you also want to press Enter automatically after checking the field.
Hope that helps
When you want to set it programmatically, you'd also use those values with the pui.set() API.
Also when calling pui.set() the "id"parameter should be in quotes. So your code would look something like this:
Code: Select all
pui.set("I_2_2","Y");
pressKey("Enter");
Hope that helps
-
- New User
- Posts: 5
- Joined: Tue May 08, 2018 9:14 am
- First Name: Max
- Last Name: Buda
- Company Name: DSC Logistics
- Phone: 8473906800
- Address 1: 1750 S. Wolf Rd
- City: Des Plaines
- State / Province: Illinois
- Zip / Postal Code: 60018
- Country: United States
- Contact:
Re: Setting Checkbox 'Checked value'
It makes sense.
I was just missing the quotes around the ID parameter.
Thanks Scott.
I was just missing the quotes around the ID parameter.
Thanks Scott.
Who is online
Users browsing this forum: No registered users and 0 guests