cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to include ‘Data Action’ step if user click the ‘Publish’ button.

Vasu_Sac
Participant
0 Kudos
198

Hi

I am using below steps in input page to update data once users enter planning data.

  1. Standard Data Action without Publish Data
  2. Standard Publish Button

Sometimes users are forgetting to Run the DA before ‘Publish’ data and giving wrong results..

If I keep ‘Publish’ step in DA by removing ‘Publish’ button from tool bar, they will not have option to ‘Revert Data’ step which don’t like it. They require ‘Revert Data’ step.

How to update ‘Data Action’ step if user click the ‘Publish’ button.

How to manage this issue, any ideas please.

Regards,

Vasu

View Entire Topic
JefB
SAP Champion
SAP Champion
0 Kudos

Maybe create 3 buttons in your story: Revert button (with scripting), Calculate button (triggers Data action without publish) and Publish button (triggers data action with publish).

Or maybe train users to use the right-click context menu on table widget > Version > Revert
Then also hide the Publish option here from within the Styling Quick Menu options.

Vasu_Sac
Participant
0 Kudos

Hi @JefB

Thank you for your message.

Just looking Revert button (with scripting).

 var planVersion = Table_1.getPlanning().getPublicVersion("Plan"); if (planVersion) { if(planVersion.isDirty()) { planVersion.revert(); }; };

Vasu_Sac_0-1747390901871.png

Users are editing the public version, so it will create Public Edit versions. In script should I need to find the relevant user public edit version to Revert, or system will take care it only Revert the changes by same user and not for any other user changes.

For, ex, two users are editing public version, by different company codes CC1, CC2. If user1 edited CC1 data and he wants Revert his changes. If he uses do Revert button using above code, will it Revert all changes including other user2 changes in CC2 data or his changes only.

There is no issue if it Revert data only for same user changes.

If not how to adjust the above code to Revert data only for same user changes.

Sorry, if it is silly doubt. Regards, Vasu

JefB
SAP Champion
SAP Champion
0 Kudos

A public version in 'edit mode' gets created per user, so Revert action only impacts edits of that user (non-published changes). Only when publishing, changes of the user are merged with the public version visible to other users.