Hi Everyone,
I am currently building a workforce management app where the user submits a placement, start date, end date, and set days. A series of actions then create a row form each day in between and also add what day name that date is.
I am trying to create a slice that only shows the row where the Set Days contains the same value as the new day name value. This will then remove any dates where the placement is not one of the individual’s set days.
I would really appreciate help with the expression, I have tried IF statement but this makes only the first row as Y, so if the set day is Thursday, Friday, it will only bring in Thursday as the first value;
ifs(CONTAINS([Set Days],“Monday”),[Day]=“Monday”,
CONTAINS([Set Days],“Tuesday”),[Day]=“Tuesday”,
CONTAINS([Set Days],“Wednesday”),[Day]=“Wednesday”,
CONTAINS([Set Days],“Thursday”),[Day]=“Thursday”,
CONTAINS([Set Days],“Friday”),[Day]=“Friday”)
Any help would be greatly appreciated,
Thank you
Solved! Go to Solution.
Change to EnumList of base type Text with values of the allowable weekday names:
Maybe this?
IN([Day], [Set Days])
Thanks, Steve for getting back to me,
I have found all of your posts on the community very helpful,
When using,
IN([Day], [Set Days])
I am getting the following error
Parameter 2 of function IN is of the wrong type
Is there anything else I need to do?
What is the column type of the Set Days column? That it’s plural suggests it may contain several days.
Apologies yes it is a text enum list that users can select multiple days, the output is therefore ‘Monday, Tuesday’
Please post a screenshot of the table’s column list from Data >> Columns in the app editor, including at least the Day and Set Days columns.
Please also post a screenshot of the slice configuration.
Thanks Steve,
Below is my table configuration;
Again thanks for your help,
Best Wishes
James
Change to EnumList of base type Text with values of the allowable weekday names:
That has done the trick thanks for your help Steve!
I was wondering, no problem if not, how do I go about adding something like the following into the IN statement;
WEEKNUM([Date]) = WEEKNUM(TODAY())
Thanks again
Perfect thank you for all your help
For my slice, I have had to compromise to create a separate slice for each day, but it’s not ideal as it means creating 5 tables,
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |