Hi all, how would i write this expression:
If this row contains FALSE find the 1st occurrence of FALSE and copy that column display name into this text field
This expression will run in the action (add a new row to another table using values from this row) and will work against the table screenshot below, the columns that contain the TRUE, FALSE data are the columns I want to query
The action will copy the data into a Failures table, you can see I have highlighted the desired results green
Iโm thinking i need some blended version of INDEX, FILTER, and maybe LOOKUP to find the display name, but so far no luck, can anybody shove me in the right direction?
Cheers,
Steve
Hereโs an idea for how to get fail_1:
index(
unique(
list(
if([surface]=FALSE,"surface",""),
if([lubricate]=FALSE,"lubricated",""),
if([edges]=FALSE,"edges","")
)
)-list("")
,1)
Iโve only typed in the first 3 categories but I hope this illustrates the idea. unique() and - list("") are necessary to completely remove all TRUE categories from the list.
Thanks Kirk, i will give this a try, i actually have used this list comparison expression before but completely forgot, much appreciated !
More concise, and without the extraneous UNIQUE()
(list subtraction does that automatically):
INDEX(
(
LIST(
IFS(NOT([surface]), "surface"),
IFS(NOT([lubricated]), "lubricated"),
IFS(NOT([edges]), "edges"),
...
)
- LIST("")
),
1
)
Interesting use of IFS(), Steve. I guess the idea is that IFS() doesnโt require the โelseโ part of the expression when itโs false. Iโll try to remember this.
User | Count |
---|---|
42 | |
29 | |
25 | |
23 | |
13 |