Skip to main content

Hi All

I have a service request for capturing details on booking a resource (Room). I have a drop down to capture which Room the requester wants to book.

Room1

Room2

Room3

etc. 

As part of my workflow automation, Once the service request has been submitted, I have an action to send an email to the request summarising the details. What i want to include here are details on where to collect a key from to access the room:

Room 1 - Collect key from Bob

Room 2 - Collect key from Sarah

Room3 - Collect key from john

etc

So I have created an expression node with the following:

if (regexMatch('{{ticket.ri_192_cf_room}}', 'room1'), 'bob', 'false')

This works, but only for room1. I want to add logic to cover output for each room. Pseudo code example for illustrative purposes:

if (regexMatch('{{ticket.ri_192_cf_room}}', 'room1'), 'bob', 'false') || if (regexMatch('{{ticket.ri_192_cf_room}}', 'room2'), 'sarah', 'false') || if (regexMatch('{{ticket.ri_192_cf_room}}', 'room3'), 'john', 'false')

How can I achieve this?

Thanks

Hi @mythumbsclick,

I’d not recommend using expression builder for that. Just create a custom object with these fields: Identity text field with the name of the room (that user wants to book → as a consequence you can select the values of that identity field in service request), lookup field for user, 2nd lookup field for user (in case of vacation of first user), lookup field for room (of first user), lookup field for room of 2nd user.

Then in your automation you can check for the selected room in the service request, match that with a reader-field in the automation and create that email with the correct placeholders using that reader-field.

Hope that helps.


That's a much better shout. Thank you.


Reply