Forum Discussion
AdamKeever1
6 years agoQrew Commander
If the "order" button is in a form, this is very simple to do using dynamic form rules. There is an option to change a date field to current date from a trigger:
You can use this in a formula rich text field if you want to use the button from table reports or in emails:
------------------------------
Adam Keever
------------------------------
You can use this in a formula rich text field if you want to use the button from table reports or in emails:
//This is the button styling:
"<a style=\" text-decoration: none; background: #00ff00; border: 10px solid #00ff00; border-radius: 3px; color: #000000; display: inline-block; font: normal 700 20px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none;
//This is the button code for your database; be sure to add your app token
href='"& URLRoot() & "db/" & Dbid() & "?\n\na=API_EditRecord&apptoken=XXXXXXXXXXXXXXXXXXXXXXXXXX &rid=" & URLEncode ([Record ID#])
//Change 20 to your field ID for status
& "&_fid_20=Approved"
//Change 19 to your field ID for approval date
& "&_fid_19="& ToText(Today())
//This is a redirect to report with ID of 2; change 2 to the ID of the report you want to display
&"&rdr=" & URLEncode(
URLRoot() & "db/" & Dbid() &
"?a=q&qid=2"
)
&
"&ifv=20'>Approve</a>"
------------------------------
Adam Keever
------------------------------
MikeKlausing
6 years agoQrew Assistant Captain
Adam,
This seemed straight forward and would work. However when I did this I have a field called “copy to Dealers orders” that gets changed to “Sent” when the order button is selected.
I also have a “date ordered” field that is just a date field.
My rule says when “copy to dealers orders” is equal to Sent
Change “date ordered” to todays date.
When I try and click the order button no changes are made to my date ordered field however. My copy to dealers orders does say sent.
------Original Message------
If the "order" button is in a form, this is very simple to do using dynamic form rules. There is an option to change a date field to current date from a trigger:
You can use this in a formula rich text field if you want to use the button from table reports or in emails:
------------------------------
Adam Keever
------------------------------
This seemed straight forward and would work. However when I did this I have a field called “copy to Dealers orders” that gets changed to “Sent” when the order button is selected.
I also have a “date ordered” field that is just a date field.
My rule says when “copy to dealers orders” is equal to Sent
Change “date ordered” to todays date.
When I try and click the order button no changes are made to my date ordered field however. My copy to dealers orders does say sent.
------Original Message------
If the "order" button is in a form, this is very simple to do using dynamic form rules. There is an option to change a date field to current date from a trigger:
You can use this in a formula rich text field if you want to use the button from table reports or in emails:
//This is the button styling:
"<a style=\" text-decoration: none; background: #00ff00; border: 10px solid #00ff00; border-radius: 3px; color: #000000; display: inline-block; font: normal 700 20px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none;
//This is the button code for your database; be sure to add your app token
href='"& URLRoot() & "db/" & Dbid() & "?\n\na=API_EditRecord&apptoken=XXXXXXXXXXXXXXXXXXXXXXXXXX &rid=" & URLEncode ([Record ID#])
//Change 20 to your field ID for status
& "&_fid_20=Approved"
//Change 19 to your field ID for approval date
& "&_fid_19="& ToText(Today())
//This is a redirect to report with ID of 2; change 2 to the ID of the report you want to display
&"&rdr=" & URLEncode(
URLRoot() & "db/" & Dbid() &
"?a=q&qid=2"
)
&
"&ifv=20'>Approve</a>"
------------------------------
Adam Keever
------------------------------
- AdamKeever16 years agoQrew CommanderAm I correct in my understanding that you are using both a dynamic form rule and a button? What type of formula field for the button and what code are you using?
------------------------------
Adam Keever
------------------------------