AnsweredAssumed Answered

Script Help

Question asked by Ben_B94 on Apr 14, 2016
Latest reply on May 17, 2016 by Ben_B94

I'll try my best to explain....


Locations -----< Hire_Join >------- Hire_Import


Hire_join contains HireJ_ID, Location_fk, Hire_fk

The hire_join layout contains related fields for Location::siteName and Hire::siteName so on the Hire_Join layout they should more or less match.


A script to create a new record for every location on the Hire_Join layout.

Whilst creating the record get the Location::siteName and check it against a list of hire::siteNames. Do a text phrase match, so say Location siteName = Summer Endowed School and the Hire::SiteName = Summer School, they should match.


If they match then set the foreign_key of Hire(Hire_fk) in the Hire_Join table = the ID in Hire_Import showing that matching location, basically so they will be related.


My goal is to basically automate the process of importing records and relating them to locations.

And if possible have it as a server scheduled script.





Currently if will create the records for each location but won't match up the site names.