on 01-04-2024 9:55 PM
Hello -
I am seeking support with something extremely fundamental, but cannot find resources anywhere...
I recently added in a few buttons as widgets to the first page of a dashboard aka story I am developing.
How would I script the button to direct me to a different page of the story when it is clicked by the user?
maram.mohd
Just put the below script in on click of the button
Application.setActivePage('Page_1') // change the page name as per your requirement
Br.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
fx.gk
There is no API which return the Page numeric value as its just the numeric sequence of the page irrespective of name. I am not sure the use case where you would need the numeric of the page but if its a pressing need you can just create a widget with numeric id like P1 , P2 in each of these pages and then just use something like below
var pg =Page_1.getWidgets({type:WidgetType.TextArea});
console.log(pg[0]);
Output
Br.
Nikhil
The idea was to set up two buttons (back and next) to jump to the previous or next page. For the purpose of reuse the buttons on other pages or stories i thought of something like
var activePage = Application.getActivePage() // here I need the numeric value
Application.setActivePage(activePage + 1) // next page
Application.setActivePage(activePage - 1) // previous page
Felix
Please refer to the below post. Although it talks about drop down instead of button, I think you can still leverage it for buttons.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.