Status will be change on click of the save button.

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

We have a status Field:
Assigned
Awaiting Query Resolution
Completed

when we click on the Add Task button it take to the another page & changed the status (assigned), but we want that the status will change on click of save button of that page.

Code on Add Task :-

If([Status] ="Received",

URLRoot() & "db/" & [_DBID_JOB_QUEUE] & "?a=API_EditRecord&rid=" & URLEncode([Record ID#])&"&_fid_21="&"Assigned"
& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_JOBS] & "?a=API_GenAddRecordForm&_fid_16=" & URLEncode ([Record ID#])& "&z=" & Rurl()),
URLRoot() & "db/" & [_DBID_JOBS] & "?a=API_GenAddRecordForm&_fid_16=" & URLEncode ([Record ID#])& "&z=" & Rurl())



Photo of pooja

pooja

  • 10 Points

Posted 4 years ago

  • 0
  • 1
Photo of Eric

Eric

  • 40 Points
The way your button is situated, the status will change as a part of your API call execution. You could remove it from the API details, and have a form rule that says "when the record is saved" and "whatever condition exists" then your action could be "change Status to Assigned"
Photo of pooja

pooja

  • 10 Points
We have two tables one is project & other is task. Button is on a Project table, when we click on the button it redirect to task table and when we click on the save button in task table then It redirects back to the project table, which is in a view mode and form rule does not work in view mode.
Photo of Eric

Eric

  • 40 Points
Thanks for clarifying how your setup is structured. If you want the Status value on Projects to change based on what happens across your Task records, you could change the data type for the Status field to a formula text type, then add summary fields to the Projects -< Tasks relationship, and base your formula logic on what's in those summary values. e.g. If([# of Tasks]=[# of Completed Tasks],"Completed",[# of Tasks]>0,"Assigned")
Photo of pooja

pooja

  • 10 Points
Thanks for replying. Is there any other way to do that because change the data type of status field will lead to many conflicts.