Can’t find the option to put a page parameter as a Boolean. Am I missing something or is this not a feature. If it’s not a feature then why is that so? Cheers
Page Parameters can only be Text
so how can I pass a boolean value to the next page if page parameters can only be text?
I suggest wrapping the page parameter in a STRING(pageVars.yourChosenBooleanVar) formula when setting up the “Navigate to” Flow Function.
So to clarify.
You have one page with the parameter that only accepts “text” let’s call it “target page”.
You have a page from where you want to navigate to the “target page” with a passed on boolean variable. This page will be “origin page”.
Let’s call your boolean simply myBoolean.
On the origin page you have to specify the value of the passed on parameter. I assume you use a tappable component and will set up a Flow Function to navigate to the Target page.
In the formula when setting the value of parameter use the “Formula” option and have it as follows:
In case you want to use the parameter as a boolean on the “target page”…
Create a true/false type variable myTargetBoolean.
On the page logic canvas after the “Page mounted” event add the “Set page variable” flow function and once again use a formula. The following one:
BOOLEAN(IF(params.yourPageParameter=="true", "true", ""))
This will in fact check if your page parameter is true then it passes the string value to the boolean formula which in that case returns the value “true”. If the boolean gets an empty string as input it will return “false”.
Hope it helps and sorry for any misspellings or over-explanations. Also it seems to me as a workaround, so there might be a much simpler solution to this as well.
Thanks a lot for your explanation!