VirtualBob Posted August 13, 2013 Posted August 13, 2013 I have an imported data field that has various entries, such as "credit card" or "invoice". If "credit card" is selected then the amount in the "Amount" field has been paid online. If its "invoice" the amount is due and we need to send an invoice. What I want to do is have an IF type statement that goes something like: If Status field is "credit card", copy Amount to PaidAmount field, else If Status field is "invoice", copy Amount to InvoiceAmount field Any ideas? thanks
doughemi Posted August 13, 2013 Posted August 13, 2013 Try auto-entered calculations in the InvoiceAmount and PaidAmount fields: For InvoiceAmount If(Status = "invoice"; Amount; "") For PaidAmount If(Status = "credit card"; Amount; "") Be sure to uncheck the "Do not replace..." checkbox
Wim Decorte Posted August 13, 2013 Posted August 13, 2013 IF[ statusField = "credit card] Set Field[ PaidAmount ; Amount] ELSE IF[ statusField = "invoice" ] Set Field[ InvoiceAmount ; Amount ] ELSE IF ... END IF Note that you don't normally use Copy but Set Field instead.
VirtualBob Posted August 17, 2013 Author Posted August 17, 2013 Thanks for this - worked at treat... Try auto-entered calculations in the InvoiceAmount and PaidAmount fields: For InvoiceAmount If(Status = "invoice"; Amount; "") For PaidAmount If(Status = "credit card"; Amount; "") Be sure to uncheck the "Do not replace..." checkbox
VirtualBob Posted August 17, 2013 Author Posted August 17, 2013 Perhaps this is a dumb question, but where is this type of if statement used? Only in a script and if so, what is its trigger? IF[ statusField = "credit card] Set Field[ PaidAmount ; Amount] ELSE IF[ statusField = "invoice" ] Set Field[ InvoiceAmount ; Amount ] ELSE IF ... END IF Note that you don't normally use Copy but Set Field instead.
Recommended Posts
This topic is 4116 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now