Home » Developer & Programmer » Forms » hide value from list of value
hide value from list of value [message #628387] Mon, 24 November 2014 13:16 Go to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member
i have a tabular form and on the form put a button to open list of value
and i want when select value 1 just example
and down to and another record and open list value the value 1 will be hide
and when select value 2 just example
and down to another record and open list value the value 2 will be hide
Re: hide value from list of value [message #628397 is a reply to message #628387] Mon, 24 November 2014 15:21 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This is untested, but - give it a try: POST in WHEN-NEW-RECORD-INSTANCE; let record group's query select values that aren't already used (i.e. posted into the database), such as
select value
from possible_values
where value not in (select value from some_table
                    where <condition that represents records already entered through a form>)
Re: hide value from list of value [message #628399 is a reply to message #628387] Mon, 24 November 2014 15:21 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Your requirement isn't really that clear. I think you are asking how to filter our values from your LOV that have already been selected in previous rows.

If this is correct, the easiest way would be to commit each row to your table and filter your LOV to exclude those values that are already in your table.

If you don't want to or can't commit between each record, this is still doable, but much harder. It would require you to keep track of all of the selected LOV values and dynamically alter the LOV's record group query to specifically exclude the selected rows.

If this is not what you are asking, please elaborate on your requirements...

Craig
Re: hide value from list of value [message #628408 is a reply to message #628387] Mon, 24 November 2014 23:13 Go to previous messageGo to next message
hassan08
Messages: 122
Registered: June 2011
Location: egypt
Senior Member

yes i don't commit between each record
Re: hide value from list of value [message #628414 is a reply to message #628408] Tue, 25 November 2014 00:10 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't either. I'd POST.
Re: hide value from list of value [message #628422 is a reply to message #628399] Tue, 25 November 2014 03:18 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
CraigB wrote on Mon, 24 November 2014 21:21

If this is correct, the easiest way would be to commit each row to your table and filter your LOV to exclude those values that are already in your table.

If you don't want to or can't commit between each record, this is still doable, but much harder. It would require you to keep track of all of the selected LOV values and dynamically alter the LOV's record group query to specifically exclude the selected rows.


You should read up on what post does.
Re: hide value from list of value [message #628475 is a reply to message #628422] Tue, 25 November 2014 09:37 Go to previous messageGo to next message
CraigB
Messages: 386
Registered: August 2014
Location: Utah, USA
Senior Member
Quote:
CraigB wrote on Mon, 24 November 2014 21:21


If this is correct, the easiest way would be to commit each row to your table and filter your LOV to exclude those values that are already in your table.

If you don't want to or can't commit between each record, this is still doable, but much harder. It would require you to keep track of all of the selected LOV values and dynamically alter the LOV's record group query to specifically exclude the selected rows.



You should read up on what post does.

If this is directed at me? If so, I am well familiar with what Post does in Forms! With Web Deployed forms - the more you can handle in the Client the better! If you are performing a round-trip to the database to Post the changes - you might as well be committing (IMO). All of the same Form Level validations occur with a Commit_Form are performed with a Post. The only significant difference is you don't have to create a Save Point in order to Rollback any committed changes whereas with the Post it is simpler to rollback the changes.

Craig...
Re: hide value from list of value [message #628484 is a reply to message #628475] Tue, 25 November 2014 11:26 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Yup, it's aimed at you, though to be honest I originally thought you ignored LF's suggestion, when actually you both posted at the same time.

I don't buy the argument that if you're doing the extra round trips you may as well commit. Both approaches will result in the same number of round trips (1 extra for post when the user finally clicks on save) and the same amount of data in each trip (commit approach will have slightly more). So the only differences to consider are the effects on the user experience.
If you post you can rollback the changes. If you commit you can't - a savepoint will not get you round that. So post makes the user experience the same as no-post or commit, but now the developer can write queries against the data the user has already entered. Committing all the time takes options away from the user. If the user enters a number of records and then decides to abandon it then post will mean that data disappears but commit means they'll have to actively delete what they entered.
So posting every record has benefits vs committing every record.


I can see benefits of avoiding network trips all together if network is an issue, but that isn't what you were suggesting.
Previous Topic: ORA-01036: illegal variable name/number
Next Topic: Trigger to clear then set focus
Goto Forum:
  


Current Time: Fri Apr 19 05:19:10 CDT 2024