Skip to main content
Solved

[FSM Mobile 5.6.3] Updating Travel/Work times on task status change

  • December 10, 2019
  • 2 replies
  • 221 views

Forum|alt.badge.img+4
  • Sidekick (Customer)
  • 6 replies

I am attempting to get the Mobile app to update the TASK.ACTUAL_TRAVEL_START_DTTM field with the current time when the task status is changed from Assigned to En-route via the mobile app.

I can update the value via client scripting, however I cannot figure out how to trigger it ONLY when the task status changes from  Assigned to En-route.

I had thought about updating via a business rule however I would not catch the exact time of when the status is changed on mobile, only when it is synced.

Thanks in advance for advice!

Best answer by Chandima Athukorala

Hi Ethan M        

I think you should  try with XML business rule on TASK_EVENT table by considering EVENT_TYPE(old and new values) , and EVENT_DTTM or AUDIT_DTTM  columns. That's is,

If  EVENT_TYPE  value changed to ENROUTE Then perform Update XML messages like

<update_task>
        <task>
          <update>
            <original_task>
              <task_id>@task_id</task_id>
            </original_task>
          </update>
          <task_id>@task_id</task_id>
          <actual_travel_start_dttm>@event_dttm</actual_travel_start_dttm> 
        </task>
      </update_task>

View original
Did this topic help you find an answer to your question?

2 replies

Chandima Athukorala
Hero (Employee)
Forum|alt.badge.img+6

Hi Ethan M        

I think you should  try with XML business rule on TASK_EVENT table by considering EVENT_TYPE(old and new values) , and EVENT_DTTM or AUDIT_DTTM  columns. That's is,

If  EVENT_TYPE  value changed to ENROUTE Then perform Update XML messages like

<update_task>
        <task>
          <update>
            <original_task>
              <task_id>@task_id</task_id>
            </original_task>
          </update>
          <task_id>@task_id</task_id>
          <actual_travel_start_dttm>@event_dttm</actual_travel_start_dttm> 
        </task>
      </update_task>


Forum|alt.badge.img+4
  • Author
  • Sidekick (Customer)
  • 6 replies
  • December 11, 2019
Chandima Athukorala wrote:

Hi Ethan M        

I think you should  try with XML business rule on TASK_EVENT table by considering EVENT_TYPE(old and new values) , and EVENT_DTTM or AUDIT_DTTM  columns. That's is,

If  EVENT_TYPE  value changed to ENROUTE Then perform Update XML messages like

<update_task>
        <task>
          <update>
            <original_task>
              <task_id>@task_id</task_id>
            </original_task>
          </update>
          <task_id>@task_id</task_id>
          <actual_travel_start_dttm>@event_dttm</actual_travel_start_dttm> 
        </task>
      </update_task>

I’ll have to toy around with that but that should work - I was thinking that the event_dttm would be the time it syncs rather than when the event happened, but it does actually do the correct time.

Thanks!

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings