In this guide:
Okta Workflows guides
Okta Workflows guides are questions and answers from the community office hours, the #okta-workflows channel on MacAdmins Slack, and other places. Read all the other guides.
How to conditionally update a table in Okta Workflows?
This guide will teach you how to update a table based on a condition. If the condition is true, you will update the record. If the condition is false, you will add a new record.
Conditionally updating a table
The table has two columns: Product and Access counter:

The flow below will search the table for a product. If a product is found, the Access counter is updated. A new record is added to the table if a product is not found.

The above flow has the following steps:
- The Helper Flow card provides input to the flow. You can enter a product in the table or a new product.
- The Tables – Search Rows card searches the table for the entered product. It returns the Row ID field.
- The Branching – If/Else card determines if the product is in the table or a new product.
- If the Row ID is not empty, a product was found (yellow section).
- Using the Tables – Update Row card, update the record by increasing the Access counter column by 1.
- The Compose card creates a message for the If/Else card output (for update condition)
- If the Row ID is empty, it’s a new product.
- Using the Tables – Create Row card, add a new product record to the table.
- The Compose card creates a message for the If/Else card output (for new record condition).
- If the Row ID is not empty, a product was found (yellow section).
The Branching – If/Else card condition editing:

Clicking on the βοΈ icon (arrow pointing) will open the following view to edit the condition:

Running the flow with input Bread results in a record update:

After the run, the Access counter for Bread is updated:

Running the flow with input Cheese results in a new record:

After the run, the table has a new product record:

Related Workflows guides
- How to Create a Flow with Multiple If-Conditions in Okta Workflows
- How to Iterate Over Rows in a Table in Okta Workflows
- How to Delete Multiple Table Rows
Workflows resources
π« Get help from Workflows specialists during weekly community office hours.
πΊ Learn from Workflows videos.
π Get help from support: discuss a Workflows topic or ask a question.
ππ»ββοΈ Get help from the community: join the #okta-workflows channelon MacAdmins Slack.
Leave a comment