Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter incorrect coded values
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00599378
Message ID:
00599418
Views:
15
>< snip >
>>>
>>>You can gather all valid codes in a variable, say lcValidAmenities and than something like
lcFilter = [NOT EMPTY( CHRTRAN( Amenities, "] + lcValidAmenities + [", "] + ;
>>>    SPACE( LEN( lcValidAmenities)) + ["))]
>>>SET FILTER TO &lcFilter
>>
>>Would
>>
lcFilter = [NOT EMPTY( CHRTRAN( Amenities, &cValidAmenities, " "))]
work?
>>

Can I put this modified expression in a table? cValidAmenities would be a global string. Lookups tables rarely get updated (almost never), so instead of using cValidAmenities string I can explicitly put the values.

>>BTW, the problem is more complicated, because SetFilter form is different, than main form, and Filter defitions are stored in a table.
>
>Yes, it would. Can you change SetFilter form to allow build filter expression dynamicaly? Otherwise you will have to update the record for this filter in the table with filter exoresions every time the list of valid Amenities codes chages.

I don't think, I can change SetFilter form. I can for this particular application, of course, but I will need to create another form with the same name in the application directory, so it would be picked up instead of CommonWg\Form form. But this sounds a little bit dangerous.

Anyway, I'm just gathering some ideas, since this is not my application currently, and I'm not sure, I would be allowed to change it in a closest future...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform