Refreshing the current harness when opening a section
Hello Guys,
I want to refresh the current harness when opening a defined section,.
Same behavior as if I have put a button on this section and on click of it,, calling "Refresh Current Harness" (but for sure on the load of the section instead)
Can you please help?
Thanks,
Rosy
***Updated by moderator: Lochan to add Categories***
Hi Rosy
This could be achieved in a couple of ways.
1) Running the script to refresh Harness
2) Place a text input as the first element in the displayed sreen's first section. Now make this TextInput invisible with some condition and Check the "Reserve space when hidden" checkbox so that this element gets loaded in DOM.
Now in this Text inputs Actions Tab add an focus event and to this event configure "Refresh Harness" action.
So whenever your section gets loaded the Harness will be refreshed but as your harness is getting refreshed and the same section would get loaded every time and the TextInput will get focus and hence again there would be a Refresh Harness again. So it would become indefinite action.
So configure this action based on some condition as below.
Hi Rosy
This could be achieved in a couple of ways.
1) Running the script to refresh Harness
2) Place a text input as the first element in the displayed sreen's first section. Now make this TextInput invisible with some condition and Check the "Reserve space when hidden" checkbox so that this element gets loaded in DOM.
Now in this Text inputs Actions Tab add an focus event and to this event configure "Refresh Harness" action.
So whenever your section gets loaded the Harness will be refreshed but as your harness is getting refreshed and the same section would get loaded every time and the TextInput will get focus and hence again there would be a Refresh Harness again. So it would become indefinite action.
So configure this action based on some condition as below.
Now in the same action set configure another Action(in the below case running DataTransform) which would set the above property to true
DataTransform would look like below
Now the Harness would be refreshed once and on the second load as the condition is false "Refresh Harness" will not be triggered.
Let us know if any issues with this.