Hello,
We use the SflNxtChg quite a bit in our programs, however the Indicator that I set on the property of the grid never seems to get turned on. I want to be able to turn it on using JS so that i can use the ReadC RPG Code like i normally would to read the subfile. Basically i want the JS code to trigger the ReadC in my program for that line.
Thanks
SflNxtChg
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: SflNxtChg
Profound UI has a "subfile next changed" property on the grid widget that is similar to the SFLNXTCHG DDS keyword. However, with “subfile next changed”/SFLNXTCHG, the user still has to initiate the record change.
If you’re looking to trigger a change using JavaScript code, I would simply recommend using the changeElementValue API (http://www.profoundlogic.com/docs/displ ... +value+%29) to set the value of an input field to its current value, which marks the record as changed. For example:
If you’re looking to trigger a change using JavaScript code, I would simply recommend using the changeElementValue API (http://www.profoundlogic.com/docs/displ ... +value+%29) to set the value of an input field to its current value, which marks the record as changed. For example:
Code: Select all
changeElementValue("input_field_id." + row, get("input_field_id." + row));
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: SflNxtChg
I tried what you suggested, however it does not trigger the ReadC instruction in my program. All that my JS does, is set the value of a row column and it does not trigger the readC after my PUI.Click().
-
- 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: SflNxtChg
Changing the field with changeElementValue (or pui.set) should trigger READC.
There was a bug in older versions of Profound UI that the 'modified' attribute was being lost if someone sorted the subfile. Is it possible that you are running into that issue? If so, it is fixed in Profound UI 4.8.2 or newer.
The only other possibility I can think of is maybe you are changing an output-only field? It needs to be an input-capable field (like a textbox widget) in order to trigger READC
There was a bug in older versions of Profound UI that the 'modified' attribute was being lost if someone sorted the subfile. Is it possible that you are running into that issue? If so, it is fixed in Profound UI 4.8.2 or newer.
The only other possibility I can think of is maybe you are changing an output-only field? It needs to be an input-capable field (like a textbox widget) in order to trigger READC
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: SflNxtChg
Ohh ok, i was indeed changing an output only field. Thank you for your help.
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: SflNxtChg
What is my subfile doesn't have an input field. It has buttons and output fields. I want to simulate a button click in my program when the user clicks on a row. I normally simply use ReadC on my subfile, however even when changing the value of the button it still doesn't work.
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: SflNxtChg
You can always create a hidden field. Use a textbox widget, but then right-click it and select Hide in the Visual Designer.
-
- Profound User
- Posts: 49
- Joined: Wed Jan 08, 2014 11:49 am
- First Name: Michael
- Last Name: Pilote
- Company Name: Oceanex
- Phone: (514) 875-8558
- State / Province: Quebec
- Country: Canada
- Contact:
Re: SflNxtChg
I had alreay thought of that option, I was just trying to avoir it as this is something that will be standard in many programs. Thank you very much to all of you for your help. We will probably go with the hidden field.
Who is online
Users browsing this forum: No registered users and 7 guests