Symptom
When using setUserInput() to capture values from an input field in a popup and store them in a table, writing a new value into the cell functions correctly.
However, if a member in any dimension is changed, the previous value should be deleted, but this behavior is not occurring as expected.
Environment
SAP ANALYTICS CLOUD
Reproducing the Issue
- Create a story that contains a table and button
- Add the following script to the button:
//delete source value:
//Table_1.getPlanning().setUserInput(Selection,""); //error: Empty data entry is not allowed
//Table_1.getPlanning().setUserInput(Selection,"*0"); // gives also 0
Table_1.getPlanning().setUserInput(Selection,valueTargetBeforeUpdate);
Notice that the old value cannot be deleted.
Cause
This is the expected behavior of the setUserInput() API
Resolution
The setUserInput API cannot be used to clear cell data, as it only accepts strings representing numbers or scalars in the form *[multiplying factor]. It does not accept empty strings, and attempting to do so will display an error message indicating that the value is invalid.
The only workaround is to use a data action to delete the cell data.
See Also
- Use the Planning APIs setUserInput and submitData
- Use APIs on Story Filter and Variables
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening an incident for SAP Analytics Cloud?
- 2511489 - Troubleshooting performance issues in SAP Analytics Cloud
- Search for SAP Analytics Cloud content using Google or Bing:
- https://www.google.ca/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- https://www.bing.com/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- Note: Add relevant text or warning/error messages to the text search field to filter results.
- SAP Analytics Cloud Connection Guide
- Getting Started with SAP Analytics Cloud Expert Community page
- SAP Analytics Cloud Get More Help and SAP Support
- Need More Help? Contact Support or visit the solution finder today!
Keywords