1

I use the podio API to create an item. In the form I have a few calculations. When I retrieve the item immediately after its creation, using the api, the fields are not calculated yet. The calculation is asynchronous, so that makes sense.

When I use a create hook, and fetch the itembased on the hook, the calculated fields are there.

Does anyboofy know if I can depend on his, meaning is the create hook fired after the fields are calculated?

Jasper Duizendstra
  • 2,587
  • 1
  • 21
  • 32

1 Answers1

0

Yes the Javascript calculations are asynchronous.

Plus also related, the MongoDB (which Podio uses on the back end) is "eventually consistent".

I faced this same problem, and ended up making a queueing system for my incoming webhooks, where I waited 30 seconds before actioning any record retrieval from Podio, to get updated values for our local reporting database to cache.

Also related more to the MongoDB asynchronicity... if you are using Globiflow to trigger updates in related tables using the javascript calulated field from the parent table, I found there was occasional incorrect values.

I solved it by adding a 30 second delay in the Globiflow script, before updating the related app/table with calculated fields from the parent app/table. This gave enough time for javascript to calculate and mongodb to save the calculated value

https://www.globiflow.com/help/wait-delay.php

Mike
  • 136
  • 6