Skip to main content

Hi Community Members,

Please let me know how we can limit the user for input value.

Means, There is an input metric where user can provide input between 0.01 to 0.99 only.

can we achieve it by security?


Hi Abhilash,

 

I can think of 3 things:

  • Inform users that they inputed a wrong value using conditional formating, ie: if value is >1, then format it in Red.
  • Create an automation for when the input value is over 1, it sends a notification with a specific message to selected users
  • Lock the value input using a dimension, for this workaround, I created a board explaining how it can work.

 

I created a dimension with my correct values, and I use a input dimension metric which will feed a result number metric for the rest of my calculations.

I have attached the full board in pdf with explanation here.

Please see file attached.

 

Hope it helps.

Best,

Benoit

 


Thanks @Benoit 

Will it impact the performance of pigment, if we achieve requirement by dimension?


Well, it’s still additionnal blocks but I don’t think there is a concrete impact on the calculations. Given the dimension is used for metric type with only with limited values for inputting and not as a metric structure.

The formula to convert the dimension to the number is pretty simple, a basic 'input dimension'.Value mapping, So it’ll be run quite fast and would remain unoticeable from an end user perspective.


Thanks @Benoit for your valuable reply.


Hi @abhilashsawla, one further approach that may supplement this would be to create a boolean metric to perform some validation logic, based on some condition. If you set the formula to produce a value of TRUE for a validation failure.

You can incorporate it as part of an EXCLUDE modifier to filter out the invalid values and produce a ‘sanitised’ metric for use in other formulas.

If you do this in conjunction with conditional formatting, you will be able to perform some fairly complex validation logic, and allow users to correct their mistakes without the invalid data impacting other calculations within your model.


Thanks @Mat 


Hi @abhilashsawla,

For further clarity, attached is a PDF export of my worked example in Pigment.

I hope this helps!


Thanks @Mat for attached pdf


Reply