Hello,
We are trying to do a RPGLE program to process textbox autocomplete option with a UDF.
We have not found a way to process the data that is being sent to the program via POST. We have tested with DATA-INTO, but it seems that the data is not sent in JSON format.
The request form-data in google developer tools are:
query=dd&limit=25&AUTH=39FE4833B424D3695C820430E381C87D53A9773823E73370ACD8ABF4EBB0F62A&UTF8=Y
We need query variable to limit response data.
Thanks in advance.
Retrieve post data in RPGLE program. Autocomplete textBox
-
- New User
- Posts: 10
- Joined: Wed Sep 16, 2015 2:57 am
- First Name: Sergio
- Last Name: Martinez Roig
- Company Name: Estibarna, CPE
- State / Province: Outside Canada/USA
- Country: Spain
- 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: Retrieve post data in RPGLE program. Autocomplete textBox
The data you are looking for is in the variable named 'query' that you see in the form data. In your example, it is set to 'dd'
To retrieve it in a Universal Display:
1. find the 'Input Parameters' property of your Universal Display record format
2. Click the '...' button in the property
3. Use the 'Add' button to add a new input parameter
4. Set the parameter name to 'query'
5. Set the bound variable to whatever you want the variable in your RPG program to be (maybe also 'query', with a large enough length to fit anything that might be typed into the textbox)
6. Save your changes, re-compile the Universal Display
7. Change your RPG program to READ the record format. After reading it, the variable you bound in step 5 will be populated with the 'dd'
To retrieve it in a Universal Display:
1. find the 'Input Parameters' property of your Universal Display record format
2. Click the '...' button in the property
3. Use the 'Add' button to add a new input parameter
4. Set the parameter name to 'query'
5. Set the bound variable to whatever you want the variable in your RPG program to be (maybe also 'query', with a large enough length to fit anything that might be typed into the textbox)
6. Save your changes, re-compile the Universal Display
7. Change your RPG program to READ the record format. After reading it, the variable you bound in step 5 will be populated with the 'dd'
-
- New User
- Posts: 10
- Joined: Wed Sep 16, 2015 2:57 am
- First Name: Sergio
- Last Name: Martinez Roig
- Company Name: Estibarna, CPE
- State / Province: Outside Canada/USA
- Country: Spain
- Contact:
Re: Retrieve post data in RPGLE program. Autocomplete textBox
thank you very much Scott,
it works perfectly
Regards
Sergio
it works perfectly
Regards
Sergio
Who is online
Users browsing this forum: No registered users and 1 guest