Im trying to write an if statement that doesnt seem to be working
I have a field Name
I want to create a new field which defines these Names.
in this field I want Closed,Open and All
I have tried below:
If(Name<>'Closed','Active')) as FieldName
This works to get my closed and active steps, how do i get all in the same statement?
FYI :I have many names in this field
Solved! Go to Solution.
It seems that you need something like generic field.
If so, try like:
Load * Inline [
'All' as GenericStatus,
Status as GenericStatus,
Resident t1 where Status='Closed';
'Open' as GenericStatus,
Resident t1 where Status<>'Closed';
Everything with closed will be closed everything else is still active.
but the user must be able to distinguish between closed active and both by selecting one in a list box...
If you don't have field name called Name. Then how you are calculating? May be check one funny solution with ValueList() ?? If not i may not understand the rek
FYI - My expression may give make sense if you have field called Name
Sorry i think i havent explained correctly.
The field Name does exist, but there is a name called closed which identifies all closed items all other items will be open hence me using <> to closed in my initial expression... There is no name = 'Open' the logic is that if it is not closed then it is open