Solved

FSM Sync Rules

  • 24 June 2021
  • 3 replies
  • 177 views

Userlevel 3
Badge +8

If we have a custom sync rule joining the task table,  all the task columns are set NULL (in mobile DB) if not specified in the attributes to extract.  


Below if the Initial query for the table. 


<hierarchy_select>
  <primary_table>c_task_journal</primary_table>
  <attrs>
    <attr>c_task_journal.*</attr>
  </attrs>
  <from>
    <table>c_task_journal</table>
    <table>task</table>
  </from>
  <where>
    <data_constraint>
      <constraint>
        <left_operand>task.person_id</left_operand>
        <operator>eq</operator>
        <right_operand>{PERSON_ID}</right_operand>
      </constraint>
    </data_constraint>
    <join_constraint>
      <constraint>
        <left_operand>c_task_journal.task_id</left_operand>
        <operator>equi</operator>
        <right_operand>task.task_id</right_operand>
      </constraint>
    </join_constraint>
  </where>
</hierarchy_select>

 

And if we don't add     <attr>task.*</attr>  , the task table values are overridden to NULL..

 

Is this an expected behaviour?

icon

Best answer by Lee Pinchbeck 24 June 2021, 16:03

View original

This topic has been closed for comments

3 replies

Userlevel 7
Badge +24

Hi @TDCSOURABH,

Yes, I would expect that to occur.

Is there a reason that this table is not added to the Task table sync instead of doing it this way around?

Kind regards,

Lee Pinchbeck

Userlevel 3
Badge +8

Ok.  It is also added in the sync rule for TASK table, and in the initial query for c_task_journal.  (Both)

Do you have any information about the execution order of the SYNC rules ?  

 

 

Userlevel 7
Badge +24

Hi @TDCSOURABH,

They should be in one sync rule or the other but not both. If you check the mobile log files that will show you the order in which the system works through the sync rules.

Kind regards,

Lee Pinchbeck