AnsweredAssumed Answered

Set Photo via Looping Script from Temp Table

Question asked by mikeo'neil on Apr 11, 2018
Latest reply on Apr 11, 2018 by mikeo'neil

I have a procedure where I am importing a folder of pictures to a Temp Table. From there I desire to loop through the records and set the Picture into another table. I am calling the Looping Script from the TempTable and the script calls the Create Photo Script then returns to the Looping Script.

 

The issue I am having is the loop does not go to the next record when returning to the Looping Script, and it imports the same Photo in every loop.

 

Relationship: TempTable::Constant =  Photos_D Table::Temp

Constant = 1 Number Field

Temp = 1 Number Field

 

I have two scripts,

 

Looping Script

 

Go to Layout [ “Temp Table” ]

Set Variable [ $$TOTCOUNT ]; Value: Get(FoundCount)

Set Variable [ $$COUNTER ];  Value: “” ]

Go to Record/Request/Page [ First ]

 

Loop

 

Exit Loop If [ $$COUNTER > $$TOTCOUNT ]

Set Variable [ $$f_Key ; Value; TempTable::f_Key ] This was one of the issues.

Set Variable [$$COUNTER ; Value; $$COUNTER + 1 ]

Perform Script [ “Create Photo” ]

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

 

End Loop

 

 

Create Photo Script

 

Go to Layout [“Photo_List”]

New Record/Request

Set Field [ Photos_D::z_PHO_UUID; $$f_Key ]

Commit Records/Requests

Set Field [ Photos_D::pk_key; $$f_key ]

Set Field [ Photos_D::Photo1 ; TempTable::Thumb_Nail_tmp ]

Set Field [Photos_D::Temp; “” ]

Go to Layout [ “TempTable” (TempTable)  //return to looping table/layout

 

What am I missing?

 

Thanks-Mike

Outcomes