BenjaminBrooks
2 years agoQrew Trainee
Save and Redirect on One Button
Hello,
We currently have two tables on that we have a relationship built. Tasks and Customers.
On the task, we have validation built so that if the status of the task is different from the status of the client, it allows for the user to update the customer from the task form with a dropdown of options [Status Change].
I am currently attempting to create a text button that does the following:
If([Status Change]=null,
"<a class='Vibrant Primary' style=\"width:310px; text-align: center;\" href='" & URLRoot() & "db/" &[_DBID_xxxxxxxxxxx] & "?dfid=14&a=er" & "&key=" & [Phone Number]
& "'>Save Task</a>",
[Status Change]<>null,
"<a class='Vibrant Danger' style=\"width:310px; text-align: center;\" href='" & URLRoot() & "db/" &[_DBID_xxxxxxxxxxx] & "?a=API_EditRecord&key=" & [Phone Number] & "&apptoken=xxxxxxxxxxxxxxxxxx&_fid_32="&[Status Change]&"&rdr=" & URLEncode(URLRoot() & "db/" &[_DBID_CUSTOMERS] & "?dfid=14&a=er" & "&key=" & [Phone Number]) & "'>Update Status and Save Task</a>")
This formula is not saving the task.
------------------------------
Benjamin Brooks
------------------------------
We currently have two tables on that we have a relationship built. Tasks and Customers.
On the task, we have validation built so that if the status of the task is different from the status of the client, it allows for the user to update the customer from the task form with a dropdown of options [Status Change].
I am currently attempting to create a text button that does the following:
- Validation is met, so [Status Change] = null
- Saves the task record and redirects to the customer record
- Validation is not met, so [Status Change] is not null
- Saves the current task that they are on with the information that is filled out
- Updates the customer record with the item from [Status Change]
- Redirects them back to the customer's form
If([Status Change]=null,
"<a class='Vibrant Primary' style=\"width:310px; text-align: center;\" href='" & URLRoot() & "db/" &[_DBID_xxxxxxxxxxx] & "?dfid=14&a=er" & "&key=" & [Phone Number]
& "'>Save Task</a>",
[Status Change]<>null,
"<a class='Vibrant Danger' style=\"width:310px; text-align: center;\" href='" & URLRoot() & "db/" &[_DBID_xxxxxxxxxxx] & "?a=API_EditRecord&key=" & [Phone Number] & "&apptoken=xxxxxxxxxxxxxxxxxx&_fid_32="&[Status Change]&"&rdr=" & URLEncode(URLRoot() & "db/" &[_DBID_CUSTOMERS] & "?dfid=14&a=er" & "&key=" & [Phone Number]) & "'>Update Status and Save Task</a>")
This formula is not saving the task.
------------------------------
Benjamin Brooks
------------------------------