If Profile Contains This – Type This, if Profile Contains That, Type That

Hello!

Looking for some help here.

The Goal:

  • I search for a person based on their ID number which is set from clipboard.
  • Enter the documents section.
  • The person's ID number is located on a Google Sheet (list of people).

This part all works well.

From there, I need to search the documents area if the worker has their employee reference book. If they do, comment on the Google Sheet, next to the worker's name.

If they do not have this document, check to see if there is a document named "arbitration agreement." If they have that document, comment on the Google sheet net to their name.

If they don't have either, comment next to their name. Three different entry options into the cell next to the name, depending on the result of the prior part.

I added the IFTTT at the end, but not sure where I was going there.


For Each.kmactions (16 KB)

Reveal–Macro–Image

Nested "If"s can be a pain, but it always helps to write it out with indents for "levels". So:

if worker has employee reference book
then
    add "reference book" comment
else
    if worker has arbitration agreement
    then
        add "arbitration" comment
    else
        add "no documents" comment
    end
end

...and you can see they can only get "no documents" if they have neither a reference book nor arbitration.

You can pop the plan pretty much straight into KM -- start with an "If" action for the first if, the condition(s) are the rest of that line, the then lines go into the "execute the following actions" of the action and the else in the "otherwise...".

1 Like

Thank you @Nige_S !