Jump to content
Server Maintenance This Week. ×

Seting a field with variable when importing from excel file


This topic is 2145 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi

i want to create a script where i can import new records via excel . i want to be able to pick up the related parent table id and place it in the designated field in the imported sub file.

The PropertyIDF (see pic below) should get from parent table. see script below , unfortunately when i do the import it only places the propertyIDF for the first record in the foundset (see pic 2,) how do i script that all new records created should get the variable data in the selected field.   i would appreciate if one could help me out on this.

image.png.bcc477c919cb79269f873362c8f13b81.png 

 

image.png.e7dd81c957c5fd436499e4f80300aa7c.png

image.png.362efc2d44ef31ce6e693898c82b4cb6.png

image.png.30bf6ed153d9b90d533b523631059b49.png 

Link to comment
Share on other sites

I think you can give the field an auto entry calculation (define  field options) so you wouldn’t need the script. Sorry if this is wrong but I cant test atm. 

Link to comment
Share on other sites

Instead of 'Set Field' you could use the 'Replace Field Contents' script step, which would have the effect of putting the same value in the same field on the whole found set.

After an import, the found set is always the records that have just been imported.

Link to comment
Share on other sites

Both methods above will work. The auto-entry option will be faster if you're importing a lot of records (say, over 1000) but that also depends on your network. If that's not an issue, I'd lean towards the Replace method because where possible, I prefer to keep my logic in scripts rather than the field entry options.

Link to comment
Share on other sites

This topic is 2145 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.