I am wanting to create a click rule which will load a specific page.
i.e. a button on page 1 will go to page 2 and a button on page 1 will go to page 3.
I have tried the below but the second button doesn't work
first button :
var pageNo = 2;Form.goToPage(pageNo);
var pageNo = 23Form.goToPage(pageNo);
Can you please advise what i am doing wrong?
What I did for this error is like what Sacha's solution but I just add the another parameter
Hi Bill and Sacha, the form.go.to page function is not working using both your methods. I have another idea to do a click rule which moves each button to the same page (3) and there will be visibility rules for each proposed button (Section). Unfortunately this not working, are you able to confirm in a click rule there can be multiple actions i.e the below is correct?
Button 1 click rule:
data.sfmvis === "TRUE" ;
Yes, you can write as much code as you want in a Click rule.
I've been assuming your page 3 is actually visible. Is this the case? Do you have any visibility rules on the page level that would prevent it from showing?
Do you have validation or mandatory fields that would prevent you from navigating to the following page?
Thanks Bill. I dont have any mandatory/val fields and I'm testing the form in UAT to that shouldn't be an issue.
Maybe you have a typo?
I've tried with a test form using Form.goToPage(2) and Form.goToPage(3) and it works fine.
Do you really have 'var pageNo = 23' instead of 'var pageNo = 3' in your code?
You're right there was a typo in my comment but the rule has the correct inputs.
I've experienced similar problems. I think it has something to do with a number not necessarily being recognised as an integer.
Unless you need to do maths, it actually makes more sense to use the reference ID: