AnsweredAssumed Answered

New Record Creation Scrip Variable Issue

Question asked by flyingdesigner on Oct 25, 2017
Latest reply on Oct 27, 2017 by BruceRobertson

I have a excel document that has three columns of info : country name, classification, and classification abbreviation. I am importing them into a temp table that lists all of the above and adds a __pk_ for good measure.  The table is called ClassificationsAll.


In my database I already have a country table with country names and IDs.


I am trying to write a script that will create a new record for each classification and while doing, it will grab the country name in the current table (ClassificationsAll), go to the Country table, perform a search using the country name, grab that country’s __pk_, go to the Classifications (note, this is different from ClassificationsAll), create a new record, and populate the _fk_ that new record with the grabbed __pk_, and drop a few other variables in.


Attached is a screenshot of what I’ve got so far.


It works insofar as it creates the new records and puts the $ClassName and $ClassAbv variables where they are meant to go.


However, it doesn’t populate the _fk_field with the __pk_ that I set as a variable.


Anyone care to take a quick scan and point out anything that I am missing?