How to automatically change a value based on ...

(Rogério Penna) #1

How to automatically change a value based on another value?

I do have a column where I insert a price, the value of an invoice.

That invoice however may be nullified later. It’s an YES/NO question.

If YES, invoice value should turn zero… or a “-” (not sure I can have a price as “-”)

However, using a VALID_IF doesn´t change the value. It just makes previously inserted values into illegal (a red underline).

Using an APP formula grays out the field so I can´t even insert a value in the first place (I used a IF… if([nullified]=“Y”, 0, [invoicevalue]+0)

I guess a Show_If would hide the value, but not delete it.

In fact, when nullifying the invoice by selecting YES, it would be best to just delete the Value field, as well as a few other value columns (Liquid Value, Receiving Date, Received Value, Tax Returns)

(Aleksi Alkio) #2

Of course you could add an extra column for true value and that would overwrite the price field value… for example an app formula like IF[nullified]=TRUE,0,[price]). If you want to clear your value, you could add a validation rule like IFS[nullified]=TRUE,ISBLANK([_THIS])) and it would take care that you donät have any value.

(Rogério Penna) #3

@Aleksi_Alkio I see, that looks exactly what I had done…

if([nullified]=“Y”, 0, [invoicevalue]+0)

Nullified is a question “YES or NO”. Any difference in checking if it’s equal to “Y” or if it’s true?

And where I wrote [invoicevalue]+0 I did that because I was getting error message by leaving the ELSE part of if as just the column…