Order Detail Avoid same producto

I want to limit the option of products to be order if the product has already been selected in the current order.

What I mean is the order is not saved but if the customer already ordered apples, apples shouldnt be available. I have tried Validif expresion using select but since the order is not saved yet, the select expresion does not work.

Hi @jujogar10 Have a look at this example it may help.

https://www.appsheet.com/samples/Only-allow-values-that-havent-been-chosen-in-dropdown?appGuidString=0fff1325-90cd-4259-814f-91bafe271f55

See this bit here:
To do this, we use a valid_if constraint on the Equipment column in the Request table. The formula we use is:

Equipment[Name] - SELECT(Request[Equipment], [Timestamp] <> [_THISROW].[Timestamp])

This formula returns a list of values. It includes all values in the Name column of the Equipment table that aren’t the equipment for some other row in the Request table. Putting this formula in the valid_if constraint limits the user’s choice to be in that list of values.

3 Likes

That worked!!! thanks

2 Likes