Workflow Designer - Outcomes
Hi everyone,
I have a workflow where the user cycles through a list of items to process via radio buttons.
- User task 1 - they are presented with a list of items and can choose via radio button (these are populated via a List of Maps)
- User task 2 - they complete details on the chosen asset
- Then they circle back and pick the next asset to complete.
I want to add an “Exit” button in case they get to task 1 and there are no more assets to choose from the list.
I have two outcomes on the form :
- Submit: Visible and Enabled when {{flw.exists(tables)}} - tables is my radio button object in the form
- Exit: Visible when ${vars:empty(tableMap)} - tableMap is my List of Maps variable populating the radio button
There is a problem somewhere - when there are no more choices to make, Submit still shows up. And Exit shows up when there are still choices to be made.
Thank you for any insights!
Gabi
gabrielechristensen
Posted 2 years ago · Edited 1 year ago·Last reply 2 years ago
2 comments
gabrielechristensen
OP2 years ago · EditedThank you very much for your reply Sean!
I was not able to use that expression in my form successfully. But I found a good workaround. I added a text element containing my ${tableMap}, and set it to not visible. Since that variable is a string, in the outcomes, I check the variable on each loop if the string is empty or not.
I also had to make sure I null my table selection variable from the radio buttons.
Works beautifully now!
Gabi
Sean Pyle
·2 years ago · EditedHey Gabriele,
Your syntax for the Exit button looks slightly different from the syntax I saw on Flowable for checking if a variable was empty. I think it should be ${var:isEmpty(tableMap)}
As for the submit button, I would use almost the same logic as you will for the exit button. So, submit is visible when table map is not empty: ${var:isNotEmpty(tableMap)}
Hope that helps!
Sean