Time for data to be written to the file

Mike Bray 's Avatar

Mike Bray

18 Jun, 2018 05:03 AM

I have an extension that runs through a file and loads security and currency prices. This is done on a one by one basis. At the end of each record I perform a .syncItem() on each record.

If I run the enclosed file and only update the Security it works fine.
If I only update the Currency it too works fine.
However if I run both together. The security is done first followed by the currency it does not work. It looks like the security is having the currency price applied twice to the base rate so 190.7 becomes 144.92.

Going through the code in debug I see that when you change the Currency Rate you update any security with that currency. Is there a delay after I have done syncItem() before the data is in the file? If so is there a way of waiting for the data to be written?

  1. Mike Bray closed this discussion on 18 Jul, 2018 08:19 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

22 Jul, 2018 05:25 AM
22 Jul, 2018 02:19 AM
22 Jul, 2018 01:40 AM
22 Jul, 2018 12:57 AM
22 Jul, 2018 12:25 AM