Need some assistance on Data field Configuration in Maestro.
My scenario is that having 5 blocks with 5 text field and 1 check box data each. I want to have a next and previous button for displaying one block data at a time to the user to select with the check box. Since there is no pagination feature in Maestro we tried to store the block data into a data field component and create a custom java script rule on a button that will paginate through this blocks of data and update the form to display each iteration of data. But we are failing in this process.
Please guide how to do the same.
add to Vinodhini comments above:
Also the result record is not fix to 5. It may be more or less depending on the result of Dynamic lookup.
I don't see the Initial data property for Data Field in maestro
what is 'data' refers to in the belowscript? is it data field name?
data' refers to in the belowscript? is it data field name?
data.currentIndex = Math.max(parseInt(data.currentIndex) - 1, 0)
data.currentIndex = Math.max(parseInt(data.currentIndex) -
On which rule to put this script? I put it in Action->Click , I got missing radix error for parseInt method
You need to select 'Include in Submission Data' for the Initial data property to display.
I don't get a radix error - did you try adding a radix?
You don't need to store all the block data in a data field. All you need is a repeat with some visibility rules to show a single item at a time:
Add a block inside the repeat and add a visibility rule:
Add buttons Previous and Next buttons underneath the repeat to decrement and increment the current Index:
The Previous and Next buttons should now cycle through the 5 items in the repeat hiding and showing them.
Let me know how you go.
Thank You Ben.
I had tried with the above steps you provided, but i was not succeed in that. I have attached the document containing the screen shots of the steps we tried. Could you please advice where i went wrong.
Thanks in Advance.
Try renaming your data field to 'Current Index'.
It's Working Ben. Thank You.