AnsweredAssumed Answered

Export Field contents

Question asked by Scorpion167 on Nov 15, 2017
Latest reply on Nov 15, 2017 by Scorpion167

I'm testing the Export Field Content script I found in FM Scripts Reference.

 

Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]

Go to Record/Request/Page [First]

Loop

Export Field Contents [Products::Container; "$PATH"]

Go to Record/Request/Page [Next; Exit after last]

End Loop

 

My script:

Set Variable [$PATH; Value: Get ( DocumentsPath ) & "/DB_Images/" & TO7Inventory::Pic1]

Go to Record/Request/Page [First]

Loop

Export Field Contents [TO7Inventory::Pic1; "$PATH"]

Go to Record/Request/Page [Next; Exit after last]

End Loop

 

My issue is that the value in the variable $Path is not incrementing to the next container field. I'm monitoring the script with Script Debugger and Data Viewer and I see the initial value for $Path get set "Desktop/DB_Images/bub0064a.jpg" but doesn't change for the duration of the loop through 1600 records.

 

The first image "bub0064a.jpg" gets copied to the $Path location but is then copied over for each record in the found set.

 

My question is what do I need to add to the script so that the container field content is incremented to reflect the correct picture?

Outcomes