Filtered valuelist

Questions, tips and tricks and techniques for scripting in Servoy

Filtered valuelist

Postby djlapin » Wed May 09, 2012 11:58 pm

I have a "service_casemis" valuelist, based on records in a choice_list table. They are linked to the other tables by UID keys, established when a user selects a service from a drop-down menu.

Some of the values are no longer used, because the codes have been retired. However, old records may still have them assigned.

I can find the current ones in choice_list by, say, today's date. I could create a dataset of these records to populate a static valuelist. So these could appear in the drop-down for the user to select.

But how, then, could I also show the legacy values for records that have these values assigned? The user doesn't need to *select* the legacy values, but should be able to see and remove them.

Thank you,
Don
Attachments
SampleDropDownOldAndNew.png
This sample has both the old (asterisked) and the current services listed.)
SampleDropDownOldAndNew.png (77.05 KiB) Viewed 1512 times
djlapin
 
Posts: 309
Joined: Fri Feb 18, 2011 9:36 am
Location: San Francisco, CA

Re: Filtered valuelist

Postby john.allen » Thu May 10, 2012 5:19 am

Why not use the 'fallback' valuelist option? For some things it doesn't work so for instance in find mode the valuelist will always revert back to the fallback valuelist which sometimes isn't wanted. But it sounds like in this case it would work. This might be especially true if I read your post correctly that users will actually be updating these legacy values.
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: Filtered valuelist

Postby djlapin » Fri May 11, 2012 8:42 am

I just tried it, and it seems to work very well.

Thanks John!
- Don
djlapin
 
Posts: 309
Joined: Fri Feb 18, 2011 9:36 am
Location: San Francisco, CA

Re: Filtered valuelist

Postby djlapin » Fri May 11, 2012 8:51 am

BTW, is it possible to have a fallback valuelist of a fallback valuelist?

Don
djlapin
 
Posts: 309
Joined: Fri Feb 18, 2011 9:36 am
Location: San Francisco, CA


Return to Methods

Who is online

Users browsing this forum: No registered users and 2 guests

cron