Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dnt503
Contributor II
Contributor II

IF statement for condensing dropdown list

I currently have 4 different types of statuses in the status drop-down list. I want to just show only two options (Open & Closed). All the statuses (In progress, Scheduled with Client) I want labeled under the 'Open' option. I've created the IF statement below but it's not capturing the data correctly. Any help is appreciated. Thank you

Current Status list: In Progress, Closed, Open, Schedule with Client

Proposed status list: Open, Closed

Script:

line 1: STATUS_C as [Status],
line 2: if([STATUS_C]= 'Closed', 'Closed', 'In progress' 'Scheduled with Client' 'Open') as [Status Flag],

Labels (3)
1 Solution

Accepted Solutions
JustinDallas
Specialist III
Specialist III

if(Match([STATUS_C], 'In progress', Scheduled with Client'), 'Open, 'Closed') as [Status Flag]

 

 

View solution in original post

5 Replies
MatheusC
Specialist
Specialist

@dnt503 

Try this, with the Wildmatch function, see more details about the function in qlik help:

If(Wildmatch('In progress','Scheduled with Client'),'Open','Closed') as [Status Flag]



https://help.qlik.com/pt-BR/sense/February2024/Subsystems/Hub/Content/Sense_Hub/Scripting/Conditiona...

Regarts, Matheus


Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
JustinDallas
Specialist III
Specialist III

if(Match([STATUS_C], 'In progress', Scheduled with Client'), 'Open, 'Closed') as [Status Flag]

 

 

dnt503
Contributor II
Contributor II
Author

I just tried and it only gave me the 'Closed' option in the drop down list...

BrunPierre
Partner - Master
Partner - Master

Perhaps,

If(WildMatch(Status,'*Closed*'), 'Closed', 'Open') as "Status Flag"

MatheusC
Specialist
Specialist

I ended up forgetting to add the field [STATUS_C] to call the values 😅. @JustinDallas  sent the complete code.

Thanks!

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!