Home » Developer & Programmer » Forms » List of Values
List of Values [message #173682] Wed, 24 May 2006 00:26 Go to next message
yram
Messages: 75
Registered: February 2001
Member
I have a list of items in a lov, example
bat
ball
basket

in the first record i can choose any one of the three items let us consider the item "bat" is selected, when i try to create a second record the list of items should be reduced to 2 items (ball,basket) should be displayed, so that the user does not have a option to create a duplicate record since the user cannot choose the item "bat" because the item "bat" will not be displayed during the creation of the secord record.

Pls do help me out in creating this type of lov..

Regards
yram
Re: List of Values [message #173689 is a reply to message #173682] Wed, 24 May 2006 00:59 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Hy Yram,

I did this as follows:

The lov is based on a record group. Everytime the user selects a value, I put that value in an assaciative array. The next step was to recreate the record group with the original query, and then something like 'when ... not in ass. array'. Then recreate the lov from the new record group and you have what you want.
It's a bit of puzzling but this is the principle. Take care that you always recreate the associative array from all the values in the form the user filled in previously, otherwise you have problems when the user changes a value.

HTH,

Regards

Rob Zijlstra
Re: List of Values [message #174280 is a reply to message #173689] Sat, 27 May 2006 03:12 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I suggest you experiment with which trigger you use to build the associative array because if the user makes a 'false' choice and goes to change that 'false' choice you still want it to be available. So instead of using the LOV trigger to maintain the associative list I would suggest using one that fires when you leave the item or the record. You may also want to keep track of the value when you enter the item so that if the value is changed you can remove the 'old' value from the associative list as well as adding the newly selected value.

And you thought it was going to be nice and simple. Wait till you have to take the choices of other users into consideration as well!!

David
Re: List of Values [message #174308 is a reply to message #174280] Sat, 27 May 2006 09:26 Go to previous message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Forgot to mention that this will not always work:

the statement
where value in (............)
has a limitation on how many values there can be between '(' and ')'.
I forgot if it is a limitation on the number or a limitation on the total length in chars. I think it will be in the Help somewhere.

Regards,

Rob Zijlstra
Previous Topic: Grant user access to menu
Next Topic: ITS URGENT! HOW I MAKE THE PICTURE FROM WEB CAM OR PC CAMERA
Goto Forum:
  


Current Time: Fri Sep 20 09:31:57 CDT 2024