Cannot set field value for tab label dynamically
A split for each shape is used in a tabbed screen flow to create tabs based on a page list. There is a requirement to customise the names of tabs in tabbed screen flow based on the data in the page list.
Field values saved into the data class of the page list are not picked up and so cannot be used to reference the work object properties.
Tabs created based on 2 pages in the ScreenFlowData Page List.
Steps to Reproduce
1. Create a Screenflow (Work Class).
2. Add a split-for-each to create tabs based on the content of a page list.
3. Try changing the step labesl for the split for each tabs by creating pyCaption field values in the data class.
The tab UI is based in the Code-Flow-Navigation classes so field values need to be saved into this class.
- For localization using static text, py caption field values can be saved into Code-Flow-Navigation:
- To set the names of the tabs dynamically based on the page list content there exists an extension point activity Code-Flow-Navigation • GetFlowDataDefaults into which user-defined modifications can be added.
- The condition for(int i=2; i<Steps.size() ;i++) means that the first and last step of the screen flow will be ignored (as they are Tab 1 and Tab 2 from the parent screen flow). This would need to be customised based on which steps need to be renamed.
- The when condition used in the step precondition is checking that the current flow is “ScreenFlowTabbed1” so that this will not execute for any other flow. This will need to be updated.
With this in place, run a test where values are set in the page list and proceed to the screen flow:
0% found this useful