Skip to main content

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!

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>


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