Offline Sync From A Joined Aggregate

I've simplified my Local Storage to a single table. Now I'm trying to create the SyncAll OfflineDataSync ClientAction.

Trying to add the Server "Create" Action, but I'm having trouble with the Source attribite.

Because the Server Action is a joined aggregate, the source is asking for a "<entity>, <entity> <Calculated Attribute> Record List".

I was expecting to use the Local Storage entity name, but it won't accept it.

Hopefully the screenshot of the Expression Window helps...

Hi Roy,

I didn't get the point.

If you still need help, and can give more details, I’m willing to help you.

Regards,

James

From your screen you have <Entity><Entity><Entity><Calculated Attribute> (Bays, CarParks, Drivers are the Entities and Occupied is the Calculated attribute).  So with the expected value only having 2 entities there is a mismatch between the data being returned in the list and the variable to hold the returned data.  You may want to define a structure for the returned data and make sure the LocalAllData uses that structure and your variable that accepts the return value uses the same structure. Otherwise, make sure the variable that LocalAllData (output variable) gets assigned to is of type Bays, CarParks, Drivers Occupied Record List.  

From the screen shot above, not able to determine which entity is missing on the source.

Solution

In typing my long winded reply as to why things still weren't working, I managed to solve the problem.

I was getting the data back from the server, but it wasn't being written to local storage.

By adding a For Each loop to the Client Sync action, it's all now working.

Still learning, but at least I've got passed this hurdle.

Cheers,

Roy

Solution

Roy Corneloues wrote:

In typing my long winded reply as to why things still weren't working, I managed to solve the problem.

I was getting the data back from the server, but it wasn't being written to local storage.

By adding a For Each loop to the Client Sync action, it's all now working.

Still learning, but at least I've got passed this hurdle.

Cheers,

Roy

Mark it a solution.