cancel
Showing results for 
Search instead for 
Did you mean: 

What does the standard reset button do in an SAC Story?

stephlef
Participant
0 Kudos

Hello experts,

I'm trying to understand what the standard reset button does in SAC (OEM) stories, and how it interacts with scripting. I mean this button :

stephlef_1-1711459579816.png

Scenario: So basically I understood that onInitialization and onActive events were triggered after the user presses the reset button. That's OK. I want also to use some event based scripts (onInitialization or onActive)

Problem 1: When the button is pressed, the story throws scripting errors if event-based scripts try to change anything (at least that's what it looks like). For example: I cannot execute

Widget1.setVisible(true);

in the onActive or onInitialization events of my story page if the user presses the Reset button, as this will throw a script execution error.

stephlef_2-1711462899122.png ...and the story doesn't reload.

The debugging console shows this kind of errors:

Spoiler
[ERROR] The story was marked as dirty during load, without any user interaction. Please inspect the stacktrace to identify the code responsible for this unexpected behavior.

continuing with:

Spoiler
Error: [FailedAction - Action: store.createInstance@[{"app":"MAIN_APPLICATION"},{"undoRedoStack":"undoRedoStack"}] - Error: Store.CanNotRecreateInstance/Cannot create [{"app":"MAIN_APPLICATION"},{"undoRedoStack":"undoRedoStack"}], instance already exists.]

Problem 2: Another strange behavior is that Script variables values are not reset to default or null values, if you check their values in the onActive event of a Page after the user presses the reset button. They keep their values from before the reset button was pressed.

Problem 3: The reset button is, so to say, at story level. So I would expect the story to reinitialize when it is pressed. But the original state of of the widget doesn't seem to change. I saw that at least a radio button group, and the visibility of widgets are not reset to the story's initial state. And also the page activated after the reset button is pushed is the last page shown before the reset button is pushed, not the first page in the story.

Questions:

  1. What does the reset button really reset? I found only this S-note, saying the button only Filter line and Variables. But the icon shown is the Undo icon, and it's for SAC 1.0. It also triggers onActive and Initialization events. OK, but anything else this button does?
  2. Are these behavior working as designed, or are they bugs?
  3. I couldn't find anything on this topic till yet in S-Notes or on the SAP community. Is there anything?
  4. Should we avoid scripting and enabling the reset button? That would be terrible.

Best regards,

Stéphane

stephlef
Participant
0 Kudos
I posted an improvement request to get an onReset event, among other events at story level. See: https://influence.sap.com/sap/ino/#/idea/319702

Accepted Solutions (0)

Answers (0)