Skip to Content

setVariableValue

Hi Expert

My query is very simple. Here is the scenario...

I have a button which i use for storing incremental value in a global variable. For every click the global variable get increases its value by 0.5. Now I want this new value to be sent through setVariableValue function so that the data source (DS_WORKING) returns with a new set of result.

Now the problem is for the first click everything is working fine. But for the second click the prompt window is appearing. Again for the third click things go right but for the fourth click again the prompt window appears. and it goes on and on ....

There is nothing in the application on startup event and variable initialization event. I am using lumira 2.3 sp2 and data source is a universe based on a hana attribute view.

Can anyone help me finding the reason and a solution.

Under button onClick event

-----------------------------------------------

XGV_WORKING_INIT = XGV_WORKING_INIT + 0.5;

DS_WORKING.setVariableValue("psWorking Hour", Convert.floatToString(XGV_WORKING_INIT));

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 23, 2019 at 10:19 AM

    It seems to me that the variable (prompt) does not accept the non-integer values. If you set an invalid prompt value, the prompt screen will come up automatically . I don't know details about your prompts, thus is could be that prompt only accepts integers (1, 2, 3) or that you need to pass in non-integers with a different decimal separator (e.g. "1,5" instead of "1.5" or vice versa.

    Note that in the Prompt screen you enter language dependent external keys that are converted automatically, while setVariableValue expects so-called internal keys.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.