I have an add page.
approval_status field is on the add page and hidden from the user. The field needs updating based on the following:
The cost field is typed in by the user after the page loads and is decimal 18.2 in the mysql database
approval_value field is loaded when the page loads in a hidden field and is decimal 18.2 in the mysql database
approval_email field is an email varchar 768 which is loaded in a hidden field when the page loads
I need to write this code:
If approval_email is NULL OR blank then approval_status=1
else if
cost >= approval_value then approval_status=2
else approval status=1
Please may I get some advice. I've been using ChatGTP and its been great for everything except this.
I'm sure this needs to be a javascript edit event. Which was one solution it gave me, but it never worked.
Which type of solution do I use for this.
After this record is updated, I have After Record Updated code which fully works, but I cannot get the approval statuses correct to trigger the next stage correctly.
Thank you in advance for any advice.