Hello community!
I’d love some troubleshooting help. What I really want is already detailed in a feature request here, where I can compare two arrays and remove the values that are in both. In the meantime, I’m trying to create a workaround and running into a few snags.
Here is a mockup of the base I’m working in: Link
I’m working with a gear reservation and rental system for a camping program. There is only one program at a time, and participants reserve rental gear ahead of time (through an online form, email, or a phone call). Requests come in and are put into airtable by whoever answers the phone.
So in the participant table, there is a column for requests, and a column for promises. I’d like to (for each participant), automatically calculate a third column for “request denials”. It may be easiest to think about it this way: “gear requests” MINUS “gear promises” EQUALS “gear denials”. If participant1 requests a raingear top and receives a raingear top, then request denial is blank. If participant2 requests a raingear top and a sleeping bag, and receives only a sleeping bag, then request denial for that participant is “raingear top.”
My hope is to create a nested if statement. I’m not yet to the nested part, I’m just trying to establish proof of concept that it works for one item.
Here is the function I’ve tried, that doesn’t work, to return nothing if “Rain jacket: W XS” is in both columns, or if it’s in neither column, and returns “Rain jacket: W XS” if it’s if only one column.
IF(
OR(
AND(
FIND(
"Rain jacket: W XS", {Gear requested}
),
FIND(
"Rain jacket: W XS", {Gear promised}
),
),
AND(
NOT(
FIND(
"Rain jacket: W XS", {Gear requested}
),
),
NOT(
FIND(
"Rain jacket: W XS", {Gear promised}
),
),
),
"",
"Rain jacket: W XS"
),
)
Is this how IF works with OR and AND?
If this works, then I’ll work on nesting the IF statement for all of the items.
I’d appreciate any thoughts, guidance, or other ways to make this work.
Thanks!
Sean