lov values shown again after clear_form [message #655157] |
Tue, 23 August 2016 03:54  |
 |
saraa
Messages: 14 Registered: February 2015
|
Junior Member |
|
|
hi
I created a tabular form with a trigger when validate item what trigger is doing that once a selected lov value skipped in the second record and so on.
It is working prefectly fine. The thing i want is when i commit and clear the form all the lov values should be shown again. it is happining when i again run a form but i want it on clear_form because i cant run form again and again.
How is this possible please help?
|
|
|
Re: lov values shown again after clear_form [message #655164 is a reply to message #655157] |
Tue, 23 August 2016 04:23   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It seems that you are creating a LoV dynamically (using CREATE_GROUP_FROM_QUERY / POPULATE_GROUP). If that's so, you'll have to reinstate query as it now, obviously, doesn't contain all values as it does when the form starts and the record group is in its initial state. Basically, you'd have to run the "initial" CREATE_GROUP_BY_QUERY once again.
[Fixed typo; was CREATE_GROUP_BY_QUERY]
[Updated on: Wed, 24 August 2016 05:05] Report message to a moderator
|
|
|
|
|
Re: lov values shown again after clear_form [message #655167 is a reply to message #655166] |
Tue, 23 August 2016 05:26   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If you are only removing rows from a LoV, I don't see another way to restore them but creating the LoV once again. It means that you'll have to use CREATE_GROUP_FROM_QUERY (instead of having it statically created by the Wizard) - just reuse that code (i.e. SELECT statement). Put it into a procedure so that you could easily call it when the form starts (WHEN-NEW-FORM-INSTANCE trigger) as well as after clearing the form.
[Fixed typo; was CREATE_GROUP_BY_QUERY]
[Updated on: Wed, 24 August 2016 05:06] Report message to a moderator
|
|
|
|
|
|
|
Re: lov values shown again after clear_form [message #655207 is a reply to message #655195] |
Wed, 24 August 2016 14:10   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
I told you, put that code into a procedure. Having it in WNFI trigger isn't the best option as it could have some additional code which you, perhaps, don't want to run once again. However, you can call a procedure as many times as you want, and it'll execute only its code (OK, depending on actual code, it might cause other program units to run, but that's not the point here).
|
|
|
|
Re: lov values shown again after clear_form [message #655209 is a reply to message #655208] |
Wed, 24 August 2016 14:56  |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
abira, the first message
once a selected lov value skipped in the second record and so on. It is working prefectly fine
abira, the last message
but my qustion was how to do that removing rows work.
Maybe I don't understand what you want to do; I thought that removing part of the job works perfectly fine, but you need assistance in restoring them back ...
|
|
|