Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter incorrect coded values
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00599378
Message ID:
00599418
Vues:
25
>< 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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform