Hexagon Geospatial
MENU

M.App Enterprise

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 18
Registered: ‎04-19-2018

Mobile - SQLTrigger and Synch data

[ Edited ]

Hi,

 

I have added a SQLTrigger to update a field from other table. 

 

<Entity.Triggers>				
    <SqlTrigger Id="updateSQL" Method="AfterSave,AfterUpdate" Sql="UPDATE car SET car_last_inspection=(select max(ins_date_inspection) from inspection_car WHERE car_num=456789) WHERE car_num='456789'"/>
</Entity.Triggers>

 

It works well, I can see the correct value on database aftersave/afterupdate, but the problem is that it doesn't synchronize on App.

I also try to update the revisionfield on database but it doesn’t synch until I restart the app.

Is it possible to force synchronization to update database values to SQLite? Or execute the trigger in SQLite database also?

 

If it's no possible, how can I update a value from another Entity? (ForeignEntity doesn't work for me)

 

Does anyone know how can I achieve this?

If there is a better wat to do that please let me know..

 

Thank you very much!

Staff
Posts: 63
Registered: ‎10-25-2016

Re: Mobile - SQLTrigger and Synch data

Hi eruiz,

 

do you see the updated value if you use pull-to-refresh on the list?

 

Regards

Christian

Highlighted
Occasional Contributor
Posts: 18
Registered: ‎04-19-2018

Re: Mobile - SQLTrigger and Synch data

Hi Christian,

 

Yes! It works with pull-to-refresh. Is possible to do this automatically?

 

 

Thank you,

Elisa

Occasional Contributor
Posts: 18
Registered: ‎04-19-2018

Re: Mobile - SQLTrigger and Synch data

Hi Christian,

 

We've seen on the new version details (0.6.95) there is an improvement on this topic:

  • Improve refresh of list row after save

 

Is there already a way to do this automatically without pull-to-refresh each time?

 

Thank you very much

Regards

Staff
Posts: 63
Registered: ‎10-25-2016

Re: Mobile - SQLTrigger and Synch data

Hi,

 

can you send me your shell via private message?

 

It would make it easier to come up with a solution.

 

Regards

Christian

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.