The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.
Aug 17, 2022 02:38 PM
I have a Learning Course table that tracks courses with either a single session or dual sessions via checkbox fields. I have links to fields in this table that identify whether an enrollee has completed the relevant sessions(s). From there I have a checkbox field that indicates whether, based on the attendance, whether an enroll has effectively completed the course. I tested a formula field that runs the checkbox field for the dual session completion, but I’m struggling to create a formula that accounts for the single session field. I initially thought it was an IF(OR(AND())) type of configuration but nothing seems to work. Here’s what I tried:
Works:
IF(AND({Session 000 Output}>0,{Session 001 Output}>0),{<TRIGGER> Completed Course}=1,{<TRIGGER> Completed Course}=0)
Doesn’t Work:
IF(AND({Single Session}=1,{Session 000 Output}>0),IF(AND({Dual Sessions}=1,{Session 000 Output}>0,{Session 001 Output}>0)),<{<TRIGGER> Completed Course}=1,<{<TRIGGER> Completed Course}=))
IF(AND({Single Session (from Workshop)}=1,{Session 000 Output}>0),<{<TRIGGER> Completed Course}=1,IF(AND({Dual Sessions (from Workshop)}=1,{Session 000 Output}>0,{Session 001 Output}>0),{<TRIGGER> Completed Course}=1,{<TRIGGER> Completed Course}=0))
IF(OR(IF(AND({Single Session (from Workshop)}=1,{Session 000 Output}>0),IF(AND({Dual Sessions (from Workshop)}=1,{Session 000 Output}>0,{Session 001 Output}>0),<{<TRIGGER> Completed Course}=1,<{<TRIGGER> Completed Course}=0))))
IF(AND({Single Session (from Workshop)}=1.{Session 000 Output}>0),OR(AND({Dual Sessions (from Workshop)},{Session 000 Output}>0,{Session 001 Output}>0)),<{<TRIGGER> Completed Course}=1,<{<TRIGGER> Completed Course}=0)
Solved! Go to Solution.
Aug 17, 2022 04:20 PM
Your nesting and syntax isn’t quite lining up. You don’t need so many IF statements, just 1 IF(), 1 OR(), and 2 AND() nested properly. I think the syntax you’re looking for is:
IF(
OR(
AND({Single Session (from Workshop)}=1,{Session 000 Output}>0),
AND({Dual Sessions (from Workshop)}=1,{Session 000 Output}>0,{Session 001 Output}>0)
),
"true",
"false"
)
Aug 17, 2022 04:20 PM
Your nesting and syntax isn’t quite lining up. You don’t need so many IF statements, just 1 IF(), 1 OR(), and 2 AND() nested properly. I think the syntax you’re looking for is:
IF(
OR(
AND({Single Session (from Workshop)}=1,{Session 000 Output}>0),
AND({Dual Sessions (from Workshop)}=1,{Session 000 Output}>0,{Session 001 Output}>0)
),
"true",
"false"
)
Aug 17, 2022 04:44 PM
I ended up figuring it out just as you showed! Thanks for your reply! Also, I was trying to drive a checkbox field so that was an additional error.