KimG
4 years agoQrew Cadet
Smarter button which checks certain info, then reacts accordingly
Hi
I have a button in QB for users to click to verify that certain information listed in a particular record is correct. If clicked, it checks a box that info has been verified. (It also records the user and date this action happens). Pretty simple.
That code looks about like this:
URLRoot() &"DB/"& Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&apptoken=XXXX_fid_92=TRUE" & "&apptoken=XXXX_fid_43=" & (Today()) & "&rdr=" & URLEncode(URLRoot() & "db/" &[_DBID_QUOTES] &"?a=dr&rid=" &[Record ID#])
Once the data has been verified, next steps can happen.
This works great... except that my users keep verifying data that is incomplete.
I need to be able to send a warning that this record cannot be verified since XZY info is missing so they will actually enter the missing data as they should.
I can't just make the fields required because some of the information isn't known when the record is created, but will later be established and is necessary before further steps happen.
How can I add that criteria to my button? It would need to cover a few different cases, along the lines of (I know this isn't the correct syntax, but is more the general idea of what I'd like to accomplish)
If [Equipment Quoted] contains "ABC" and [ABC model number] is blank, then display message "Model number must be filled in before the configuration can be verified", ... {additional cases listed here; note that [Equipment Quoted] is a multi-select field which pulls in related additional fields}... else, {execute existing button function to verify the config}
Or is there some other better/easier way you might suggest going about this?
My other thought is to somehow use a form rule to hide the "verify config" button unless all these conditions are met, but that too seems complicated. I already have a form rule to hide the "verify config" button once it has already been verified.
Right now it seems they just wantonly click the button so they can execute the next steps, which will work, but then end up putting incomplete data in the system.
Thanks for any suggestions!
------------------------------
Kim Gardner
------------------------------
I have a button in QB for users to click to verify that certain information listed in a particular record is correct. If clicked, it checks a box that info has been verified. (It also records the user and date this action happens). Pretty simple.
That code looks about like this:
URLRoot() &"DB/"& Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&apptoken=XXXX_fid_92=TRUE" & "&apptoken=XXXX_fid_43=" & (Today()) & "&rdr=" & URLEncode(URLRoot() & "db/" &[_DBID_QUOTES] &"?a=dr&rid=" &[Record ID#])
Once the data has been verified, next steps can happen.
This works great... except that my users keep verifying data that is incomplete.
I need to be able to send a warning that this record cannot be verified since XZY info is missing so they will actually enter the missing data as they should.
I can't just make the fields required because some of the information isn't known when the record is created, but will later be established and is necessary before further steps happen.
How can I add that criteria to my button? It would need to cover a few different cases, along the lines of (I know this isn't the correct syntax, but is more the general idea of what I'd like to accomplish)
If [Equipment Quoted] contains "ABC" and [ABC model number] is blank, then display message "Model number must be filled in before the configuration can be verified", ... {additional cases listed here; note that [Equipment Quoted] is a multi-select field which pulls in related additional fields}... else, {execute existing button function to verify the config}
Or is there some other better/easier way you might suggest going about this?
My other thought is to somehow use a form rule to hide the "verify config" button unless all these conditions are met, but that too seems complicated. I already have a form rule to hide the "verify config" button once it has already been verified.
Right now it seems they just wantonly click the button so they can execute the next steps, which will work, but then end up putting incomplete data in the system.
Thanks for any suggestions!
------------------------------
Kim Gardner
------------------------------