Support Article
Modal window navigation doesn't function well
SA-5502
Summary
User has a modal window to edit items in a top-level pagelist containing a list of work objects (of a single work type) on the clipboard. The button in each row to launch the modal for each list item works fine, but it’s in the navigation between items in the list using the next/previous buttons (in pyGridModalTemplate) where issues arise.
The next/previous buttons do not disabled properly according to the list items index, i.e., the first item has the "previous" button still enabled and the last item has the "next" button still enabled. Clicking either of these at their respective positions in the list results in an IE error which seems to crash the modal window, which remains open but is unresponsive. The modal cannot be closed, buttons can no longer be pressed - the only solution is to close the open work item.
Error Messages
There was an error when loading the content given.
IE Error: unknown runtime error.
Steps to Reproduce
- Create a repeating grid layout. Data must be contained in multiple rows.
-> Let the first column represent any property.
-> Add a button to the second column. Use this button to launch a local action inside a modal dialog.
- The local action (here FA) should be empty, i.e., it should not contain any section.
- Create a flow action for the repeat grid section and use it in a flow rule. Launch this flow.
- In the first row, click the Button.
- Notice the modal dialog launched has 4 buttons – ‘Previous’, ‘Next’, ‘OK’ and ‘Cancel’.
- Even when the first row is selected, the ‘Previous’ button is active.
- Similarly, for the last row, the ‘Next’ button is active.
- In these 2 scenarios, if the Previous button is clicked (when on 1st row) or if the Next button is clicked (when on 2nd row), an “Untimed error exception” and a JavaScript error is thrown.
Root Cause
The current way is not the correct way to implement a modal dialog launch action functionality for a repeating grid containing multiple rows.
Resolution
This issue is resolved through the following local change:
1. In the button's properties, change the click action from Launch -> Local action -> Target: Modal Dialog to Handle List Items -> Open Local Action -> After Action: Refresh Current Item (recommended)
2. This option launches the flow action (local action) in a modal dialog with the expected functionality of the modal dialog buttons.
-> For example, if the first row is selected and the modal dialog is launched, the Previous button is disabled by default.
-> Also, if the last row is selected and the modal dialog is launched, the Next button is disabled by default.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.