Skip to main content
Solved

FSM Sync Rules


Forum|alt.badge.img+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?

Best answer by Lee Pinchbeck

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

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+24
  • Ultimate Hero
  • 1219 replies
  • Answer
  • June 24, 2021

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


Forum|alt.badge.img+8
  • Author
  • Sidekick (Customer)
  • 27 replies
  • June 24, 2021

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 ?  

 

 


Lee Pinchbeck
Ultimate Hero
Forum|alt.badge.img+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


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