Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculated expresion in Grid column Control Source too l
Message
 
 
À
26/11/2001 21:07:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00586115
Message ID:
00586128
Vues:
25
>Hi All,
>
>I am trying to put Calculated Expresion in Grid Column Control Source but it
>is too long.
>i.e.
>iif(job_status_2='0','Dispatched',iif(job_status_2='1','Accepted',iif(job_st
>atus_2='2','Rejected',iif(job_status_2='3','Attended',iif(job_status_2='4','
>Commenced',iif(job_status_2='5','Work
>Suspended',iif(job_status_2='6','Recommenced',iif(job_status_2='7','Complete
>d',iif(job_status_2='8','Created',iif(job_status_2='9','Waiting for
>Dispatch',''))))))))))
>
>I want to display to user Description instead of value 0,1,2,3 etc...
>
>Is there any other way to do what i want to achive?
>
>Regards
>
>Dejan

Hi Dejan,

The simplest way would be to create a table with three fields: Status C(1) Descript C(25) MyColor I. Set relation to your second table by
select DescriptTable
set order to Status
select MainTable
set relation to Job_Status_2 into DescripTable
I added a third field myColor. Based on this color you can display different status in different colors in your grid. Let me know, if you want me to expand the explanation on this idea. I found, that this idea works much faster than complicated iif statement...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform