VALID IF IT IS A MULTIPLE OF ANOTHER NUMBER

I apologize if it is a topic already covered, but I cannot find the solution to this problem.
When filling out an order, the agent must fill in PRODUCT [QUANTITY] by entering the total kg sold. I would like this quantity entered to be valid only if it is a multiple of the number entered in PRODUCTS FORMAT [FORMAT].

example:

PRODUCT [QUANTITY] = 100
PRODUCTS FORMAT [FORMAT]= 25
quantity is valid

PRODUCT [QUANTITY] = 90
PRODUCTS FORMAT [FORMAT]= 25
quantity is not valid

these are my current tables:

RIGHE_ORDINI table is a child of ORDINI table (all theese table are linked with ref field)

how should i fill the “vaid if” RIGHE_ORDINI[QUANTITY]?

In valid-if expression you can use MOD() function which which will give the remainder of arithmetic division

Validif

MOD([_ThisRow].[Quantity], [_ThisRow].[Format]) = 0

4 Likes

thanks I did not know the MOD function. It works perfectly

3 Likes