bigtom

Problem with SetField

Discussion created by bigtom on Aug 29, 2014
Latest reply on Aug 30, 2014 by ariley

For all the usual reasons I have a robot client running label print jobs for iPad users.

 

The iPad script sets a flag in a print table that the robot FMP client checks for. It also sets a field for the language the label needs to be printed in.

 

The robot does fine and finds the flags and prints the labels and such. The issue I am having is a script step to set the language value does not alwasy work. I have tried SetField, SetFieldByName, GoToField and insert, Replace contents, and few others. I tried setting the value directly from the flag value and setting a variable the setting the language by variable.

 

I watch the data viewer and the language field is set at 1. I pass in (by field set on the layout) the language flag of 2. I see the flag value and the $lang variable set to 2 in the data viewer. When the script step to set the language field runs it sometimes does not change to 2 and remains 1 and prints the incorrect language. Pressing the print button on the iPad a second time seems to set it correctly, but something as simple as SetField should always be working and quickly. If $lang = 2 and There is a step to SetField [language; $lang] then the field should be set to 2 and not 1.

 

Also tried commiting records and refreshing windows at a number of points in the scripts. No help there. The language is run by a virtual list. I am thinking this has somethign to do with the speed of the script. When I run through it step by step in the script debugger it never fails. Running normally has problems. I tried pauses in the scripts but that did not help either. Tried running the robot script at long intervals 5+ seconds and still no change.

 

The selected language field is in a related table to the record being printed and the field is on the layout.

 

If FMGo had more control over printing in general this would not be a problem. Currently telling users to print a second label if the wrong language comes out.

 

Any ideas on how to get this working better? My next step to test is a global variable but this is a problem when multiple print jobs with different languages are processing at the same time.

Outcomes