Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ashishbp
Contributor
Contributor

New field creation using existing field

Hello Friends,

Can any one tell me how to show in front end filter Status= Active , Inactive , All.

There is field in database as Status = Y, N .  I want to show third field also 'All'

Thanks

AP

6 Replies
ChennaiahNallani
Creator III
Creator III

Try this

if(Status = 'Y','Active',if( Status = 'N','Inactive','All'))  as Field Name

ashishbp
Contributor
Contributor
Author

thanx for your response,

but if i am doing like that, I'm not able to see third field in filter it show only two fields

ChennaiahNallani
Creator III
Creator III

can you share sample data

ashishbp
Contributor
Contributor
Author

LOAD * INLINE [

    FIELD, STATUS

    ABC, A

    EFG, A

    HIJ, I

    KLM, A

    NOP, I

];

//STATUS A=ACTIVE, STATUS I= INACTIVE , STATUS A & I= ALL

ChennaiahNallani
Creator III
Creator III

if status contains both A& I you want show 'All' right

jonathandienst
Partner - Champion III
Partner - Champion III

The best QV practice is to train your users that no selections = All, but failing that, you will have to load some additional data. Something like

StatusDim:

LOAD * Inline

[

    Status, StatusDim

    Active, Active

    Inactive, Inactive

    Active, All

    Inactive, All

];

and use StatusDim in your listbox/filter

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein