AnsweredAssumed Answered

Server Imports from Same file

Question asked by fmpdan on Jan 22, 2016
Latest reply on Jan 28, 2016 by user19752

I need to run a script from the server where one steps requires importing records from a table in the same file.

Setting this up client side the file path is file:MyFile and it works fine.

When I run it on the server I get file not found error 100.

 

I seem to remember a trick or way of doing this that solves the issue, but I can't find it anywhere.

 

 

Here is the script

# Run pricing field popultor

Go to Layout [ “RadiologyFacilitiesSQL” (RadiologyFacilitiesSQL) ]

Go to Record/Request/Page [ No dialog ; 4453 ]

 

 

Set Variable [ $ID ; Value: RadiologyFacilitiesSQL::FaciltiyID ]

Go to Layout [ “ProcedurePopulator” (ProcedurePopulator) ]

Replace Field Contents [ No dialog ; ProcedurePopulator::FacilityID ; $ID ]

Go to Layout [ “RadiologyPricing” (RadiologyPricing) ]

Set Error Capture [ On ]

Perform Find [ Restore ]

If [ Get ( FoundCount )=0 ]

  // Import Records [ No dialog ; “Needyds_data.fmp12” ; Add; Mac Roman ]

  Import Records [ No dialog ; “NeedyMeds_data” ; Add; Mac Roman ]

  // Go to Record/Request/Page [ First ]

  // Loop

  // Set Field [ RadiologyPricing::NotAsked ; 1 ]

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

  // End Loop

  Replace Field Contents [ No dialog ; RadiologyPricing::NotAsked ; 1 ]

Else

  Import Records [ No dialog ; “NeedyMeds_data” ; Update matching; Mac Roman ]

  Set Variable [ $date ; Value: Get ( CurrentDate ) ]

  Constrain Found Set [ Restore ]

  // Loop

  // Set Field [ RadiologyPricing::NotAsked ; 1 ]

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

  // End Loop

  Replace Field Contents [ No dialog ; RadiologyPricing::NotAsked ; 1 ]

End If

Go to Layout [ original layout ]

and a screen shot of one of the import file dialogue box where I tried to add an fmnet: path also although I didn't think that would be needed.

Outcomes