Let me start off by apologizing if this is simple. I am new to ProfoundUI.
In the green-screen environment, I have a screen that has three fields on in. Each of these three fields is searchable. Meaning, that I press F4 and the DSPF uses the RTNCSRLOC to return the field name to my program and I call the appropriate search/prompt program based on the field name.
In ProfoundUI, I have put a button next to each field and assigned the shortcut key as F4 and response as *IN04. I want to be able to click on the button next to one of the fields and have my RPG program continue using the field name to determine what search program to call. My problem is this does not work when I click the button, unless I position the cursor into that field before clicking the button.
Is there a way to set the cursor position when I click on a particular button, so my program gets the correct field name?
F4 for Searches/Prompts
-
- Experienced User
- Posts: 100
- Joined: Tue Feb 21, 2012 1:24 pm
- First Name: Robert
- Last Name: Mullis
- Company Name: WRC
- State / Province: Georgia
- Country: United States
- Contact:
- Rob
- Profound Logic Staff Member
- Posts: 135
- Joined: Fri Jan 04, 2008 12:12 pm
- First Name: Rob
- Last Name: Ferguson
- Company Name: Profound Logic Software
- Contact:
Re: F4 for Searches/Prompts
Try this. First get the id property of the text box (not the field name). Let's assume it is TextBox1.
Then on the associated button's onclick property, enter this:
Then on the associated button's onclick property, enter this:
Code: Select all
getObj("TextBox1").focus();pui.click("F4");
-
- Experienced User
- Posts: 100
- Joined: Tue Feb 21, 2012 1:24 pm
- First Name: Robert
- Last Name: Mullis
- Company Name: WRC
- State / Province: Georgia
- Country: United States
- Contact:
Re: F4 for Searches/Prompts
That worked great Rob, but I had to make one minor adjustment. Since I am using the INDARA, I had to change the id on the pui.click to the id of the button, instead of "F4". Just using "F4" didn't send the response indicator of *IN04 back to the program.
Who is online
Users browsing this forum: No registered users and 6 guests