Set the Maximum a a Number with an exrpression

Hi there,

I need the maximum of a number type column to depend on another parameter (such as Usersettings for exmple). But it seems that it’s not possible to write any expression in there. Is there a workaround? Thanks!

I believe you may wish to further elaborate your requirement.

In general, you could use an expression like [_THIS]<=USERSETTINGS(MaxSet) in the valid_if of the number field that you wish to restrict to a certain number.

MaxSet is in turn a number type usersettings filed where the user can define the maximum value.

1 Like

Hi Julien, it sounds that you want to set the Max option in the Number field dynamically with an expression. I’m afraid that’s not possible at this moment and you need to do that as @Suvrutt_Gurjar just described.

2 Likes

For reference:

1 Like

Thanks for the replies.
Would the Valid_if work with Range as display mode?
This is the final purpose of my question :slight_smile: actually
I need the a Range display mode (which looks awesome!) with Min and Max that can be changed.

Thanks!

The validation is a different thing than Max & Min limits. Though the Validation will work with all display modes.

2 Likes

image

In this example, the maximun is set to 5 using a Valid_if expression. But the App still displays the limits (which is 10) instead. Number 7 is invalid but this is not as user friendly as I would like it to be. I need the range itself to to limit to 5.

The range slider is strictly defined by the Minimum and Maximum values, which are fixed values.

1 Like

Thanks, that bring us back to my first comment :grinning:
Could AppSheet be upgraded so the Min and Max values of a number (or decimal, percent) allow a formula expression?

Anything’s possible. Feel free to post a feature request.

1 Like

Will do :wink:

2 Likes