8 Replies Latest reply on May 27, 2019 11:54 PM by Sree Renganathan Murugesan

# Can we store a value provided in parameters by the end user

Hi All,

I have received a request from the user that, we have three parameter filters...

Only after the user provide the value to the third filter, the calculated field should trigger...Please find below

If ISNULL( [Parameter3] )

THEN NULL

ELSE

[parameter1]+[parameter2]+[parameter3]

END

Consider at first user provided 1,1,1

Then the result will be3

But Now when user changed the value for parameter 1 & 2 and not for three...

in this case it is 2,3,1...(note: parameter 3 is not change)

So, now since the third parameter is not changed, the calculated field should not provide any results.

Is there is any way to achieve, I have a idea of using like

If ISNULL([parameter3]) or ([previous value of parameter3] = [current value of parameter3])

THEN NULL

ELSE

[parameter1]+[parameter2]+[parameter3]

END.

Is there is any way to store the value provided by user in parameter...or any other way to achieve this?

Regards,

Sree

• ###### 1. Re: Can we store a value provided in parameters by the end user

Hi Sree,

You should be looking at the value that the parameter changes - in the calculated field. Using the same logic as above, just create a null test or a < test that you then put on the filter so that the sheet shows no data until the parameter has been selected.

HTH

Peter

• ###### 2. Re: Can we store a value provided in parameters by the end user

Hi Peter,

Thanks for the quick reply,

But how can we get the previous value provided in parameter?

I understand you are asking to write a condition like the below in the calculated field...

If ISNULL([parameter3]) or ([previous value of parameter3] < [current value of parameter3])

But when we use this the value in the parameter 3 will have the current one which is provided by the user.

So consider, when user provided 1 earlier and 2 in the current selection for parameter 3, as per above it will have like...

If NULL([parameter3]) which is not satisfied or (2=2) which is gonna pass....

Instead it should be

If NULL([parameter3]) which is not satisfied or (1(previous value)=2(current user provided value) which is gonna fail and then the loop executes...

Please let me know is that understandable or i need to explain in a different way.

Sree

• ###### 3. Re: Can we store a value provided in parameters by the end user

Hi Sree,

if [parameter] = '3' then 'show'

else 'hide'

end

Drop this onto the filter.

Grateful if you could upload a sample .twbx so I can show you if this doesn't help.

HTH

Peter

• ###### 4. Re: Can we store a value provided in parameters by the end user

Hi Peter,

Please find below the sample twbx file (Not sure how to upload twbx file here) The py is the calculated field and the formula is

"" IF ISNULL([B Parameter]) OR

[B Parameter]<>[B Parameter]

THEN

NULL

ELSE

[A Parameter]+[B Parameter]

END ""

As per the above image, the current value of B parameter is 35, which is not null and hence the py calculation provides the addition of both a & b parameters..

Request is :

Now, consider a user changes the value of A parameter from 26 to say 45, and since the user does not changed the B parameter, the result should show NULL...

Thanks in Advance for all your efforts and help,

Cheers,

Sree

• ###### 5. Re: Can we store a value provided in parameters by the end user

You might have to wait for a while for the .gif to load.

HTH

Peter

1 of 1 people found this helpful
• ###### 6. Re: Can we store a value provided in parameters by the end user

Hi Peter,

Thanks for the info,

Please find attached the sample twbx file.

Let me know if you need any further info.

Regards,

Sree

• ###### 7. Re: Can we store a value provided in parameters by the end user

Hi Sree,

Please see attached viz. I have included a 3rd parameter which controls whether or not the view is visible - thus this allows users to input data on the first 2 parameters before using the 3rd.

You can't do a self-test on a parameter i.e.

IF ISNULL([B Parameter]) OR

[B Parameter]<>[B Parameter]

Both of these statements can't equate - a parameter has to be a value, so can't be null, and it cant ever be < or > itself.

HTH

Peter

• ###### 8. Re: Can we store a value provided in parameters by the end user

Hi Peter,

Thanks for the effort, and yes need that confirmation...

"You can't do a self-test on a parameter"

Thanks again,

Sree