Time for data to be written to the file

Mike Bray (Quote Loader Author)'s Avatar

Mike Bray (Quote Loader Author)

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 (Quote Loader Author) 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

14 Dec, 2024 07:05 PM
14 Dec, 2024 06:35 PM
14 Dec, 2024 06:22 PM
14 Dec, 2024 05:15 PM
14 Dec, 2024 03:08 PM