Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
jeroenvandera
Contributor

New in 1.4 is the ability to give the business users the option to undo actions. In this blog I will try this function and apply it to some scenario’s that might be feasible. In some places I reference that I would rather use bookmarks for some scenarios . That is a different subject in itself which I will follow up on in a later blog.


Using Undo

The first step is to set the maximum of steps you can go back from your current state.

Once this is done you can apply the script below in a button to make undo possible :



var ButtonState = State.isBackOneStepAvailable();
if (ButtonState) { State.backOneStep();}

That’s easy enough I think. You can off course omit the var statement and immediately put the State.isBackOneStepAvailable() method in the if statement, but personally I like to err in the direction off readability over compact coding.

When testing I thought I want to use the global script and add a number of methods in the script. I was curious whether one step back was the entire global method or just one step within the global method. It turned out that one step is the global script as a whole. I tested this by setting the text of two objects multiple times in two global script components. With one undo action the original state was set on both objects.

This part is working nicely. A nice to have for the future would be the redo functionality. Especially as an analyst you have situations where you go back and forth between the current version of the analysis and the state 5 steps ago. For example to check if your numbers still line up.

While I’m thinking of nice to haves in relation to the 5 steps… A way to do multiple steps in one go could also work nicely 😉

But thinking through in this: off course you can achieve that by setting bookmarks and alternating between them.


One point though. If you have planning functionality in your application, be aware that the undo function does not work on the numbers that have been submitted or planning functions performed. If you need undo there you have to arrange this in the planning application.


Setting up the Reset

The reset button is similar to the undo button


var ButtonState = State.isBackToStartAvailable();
if (ButtonState) { State.backToStart();}

When personalization is set the BacktoStart function will go back to the personalized state.

I’m a bit confused about the isBackToStartAvailable though. I throught it would work only when the original state is less than the number of undo steps away, but it seems to work always. When you personalized the original state is the personalized state after reloading the app.

So if you want to save the state of an application the better way is to use bookmarks.

Setting up the Personalization

To set the current state of the application as the starting point you can use

  1. State.setPersonalization();

To remove the personalization you have to add a button with the script :

  1. State.deletePersonalization();

You have to watch out  though when you allow personalization :

In the notes on personalization the following was added :

“3. On Startup scripts and On Variable initialization do not run when personalizing an analysis application.”

Source: Application Designer Guide: Designing Analysis Applications page 110


This means that if you do a lot of setting up in your startup routine you have to look for other ways to set up.

Tip from me: immediately add the depersonalization button if you add the personalization button. I didn’t and had to save the application under another name because new components didn’t appear at all after saving and refreshing. That’s including the depersonalization button…. (this was in local mode)

So all in all this function does have its drawbacks it seems. In your design you have to move script from the startup to other places. For example filling listboxes with dimensionvalues. The startup becomes a function that sets up basic variables until the user personalizes it. Then the personal settings will be leading.


What I think as a must have for future versions of Design Studio is a function isPersonalized(). In for example BEx a lot of user confusion is about settings that they had personalized and didn’t remember. You want to have a clear message in your application to help them remember that they did personalize the application.

Conclusion

On the TechEd not many words were spent on this little feature. But nevertheless this feature can be a nice addition to your application. When you use personalization be aware of the drawbacks and look if you rather want to use bookmarks instead.

  1. Although I have mentioned some nice to haves I think these features already can have an added value in the current state, but off course adding them would be.. well… nice to have J
2 Comments
Labels in this area