I am building a workflow with a:
-
Trigger Resource: Compose Page
-
Trigger Event: onManual
Context: The idea is to have a 'Learn More’ field on each Module List Page. Based on which module the button is clicked from, I want the Gateway to display the appropriate prompt.
Question: What would be the configuration of the Gateway (assuming an Inclusive Gateway would be best for this use case)? How can I read the Page Handle in it and compare it with a String?
I am attaching some screenshots of the Page Button and Workflow for reference. Including some attempts I was trying with the gateway.
Any insights or help would be greatly appreciated!
If you want only one branch to continue you need to use an exclusive gateway.
The order of branches (conditions) is important since it evaluates the conditions in order and goes down the path of the first true condition.
Conditions use comparators not assigning.
Change page.handle = 'foo'
to 'page.handle == 'foo'
https://docs.cortezaproject.org/corteza-docs/2023.9/integrator-guide/expr/index.html#_operators
I think problem is with the page.handle
expression. Attaching screenshot for Error and the new Gateway
Using ‘Constitution’ instead of “Constitution” give me below in the workflow
Also attaching a screenshot of the Page Handle used in Gateway
@jfortun
Try logging just the page, im pretty sure its an ID not the actual object.
So you’ll have to fetch the page based on the ID first before comparing.
I suggest using prompts to log out values
@jfortun you were right, if I just do page
in the prompt I get Id’s when I run it
- The Gateway now works if I try
page == 375482416518660099
Next question is around the fetching part you mentioned. Now let’s say I don’t want to hardcode Id’s in the workflow. I want to be able to fetch the Page to get the handle or the name and use that in the gateway instead.
To fetch a record my understanding is we use Function
element. What kind of Function Type would we need in this case?
If we use Compose records search, how do we define the module, the module could be anything then?
Sorry, there is no function to get the page by ID currently… (my bad on that one)
That will be added in the future, currently you’ll have to match the ID’s themselves.
Either that, or you could have a workflow specific to that page.
1 Like