If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#54223 by Andrea
Mon Jun 29, 2020 5:19 pm
I have a BO (Import.BO) that I use to hold imported data that I want to link to an existing BO (Contact.BO).

I have a process that inserts the Contact.BO to the Import.BO (1:1 relationship) that works only when I run it from an individual Import.BO record.
“InsertContact” Process code:
FIND Contact WHERE Contact.Email=Import.Email
INSERT Contact IN Import.ContactLink

I thought if set up a process like below I could run the InsertContact Process on all the Import.BO records.
Mulit_Insert Process code:
FIND Import WHERE Import.State=‘existing’ IN BATCHES OF 1
InsertContact (process above)

But the log is telling me that “Value of the attribute Email of object Import could not be resolved”.

I’m obviously missing a step that puts the record in context. I tried using “ThisImport.Email” and “ThisContact” with no luck.

What I’m I doing wrong?
Last edited by Andrea on Tue Jun 30, 2020 4:00 pm, edited 1 time in total.
#54224 by Jaymer
Mon Jun 29, 2020 7:56 pm
Hi Andrea in Canada - nice to hear from you - glad you're still around!

So I think its telling you that because there is no instance in context.
Is this immediately after the import? if so, a COMMIT TRANS... will help as those recs may not be posted yet.

And if its a standalone process, then try removing the IN BATCHES OF 1 and just call a "_b" process with IMPORT as Input, and it will feed all the found Import recs to the child process.
The logger will then show ID #s of the eligible recs (and the FIND will show a count) and you'll see more about whats happening (or not) behind the scenes.
#54225 by Andrea
Mon Jun 29, 2020 10:45 pm
Hey Jaymer, yes I'm still here :D

I've set up my import so that it dumps to a BO so I can clean up the data and run some processes before I either create a new Contact or modify an existing Contact (the data contains a mix of both). So yes, the records are there. I want to insert the matching Contact (based on email address) to the Import.BO to create the relationship so that I can compare/modify the records and create child records for the Contact based on the Import.BO record. (The Import.BO record contains data for the Contact and for the creation of a child record for that Contact).

If I open an Import.BO record and run a process to insert the Contact it works. If I run a stand-alone process to find each Import.BO record and run the insert Contact process, it doesn't work.

The IMPORT suggestion is interesting. Are you saying that I should connect the Contact I'm trying to find when I import the data to the Import.BO? I was hoping to connect after my data was imported and cleaned up, hence the "temp" Import.BO

I thought this would a simple process to write...nope :wink: Is there any other way to do what I want to do?

Thanks for your help on this :D
#54227 by Jaymer
Tue Jun 30, 2020 4:34 am
will be able to help you knock this out with a skype or zoom call on Tue.
skype: JaymerJaymer or email zoom invite to jaymer at me.com
#54228 by ACDC
Tue Jun 30, 2020 8:52 am
Code: Select allI thought this would a simple process to write...nope

A simple way to do this is to leverage object rules to achieve the objective. This way you can guarantee context is always in place and also lock down a failure unique to one record as opposed to the whole process aborting

So instead of starting off with a process, rather create a rule on the IMPORT object using IF Object IS NEW. When the import object is created, the rule will be fired linking your Contact object based on your Object rule criteria. (sometimes depending on the objective and complexity you may have to refer to a process in your Object rule. )

I have some very complex Import routines that rely on a business rule taking over from the initial object creation, in some cases initiating the creation of other new objects which in turn fire similar object rules achieving a formidable result . :)
#54231 by Andrea
Tue Jun 30, 2020 2:22 pm
Thanks Jaymer - I will reach out to you today.

ACDC - That's a great tip. I was trying to use business rules after the data was imported, not during importing/creation. Sounds like that is the better way to go. Thank you
#54232 by Andrea
Tue Jun 30, 2020 4:05 pm
Apparently I've been surviving all these years without using the feature of "input" in a process. Jaymer introduced me (thank you). Glad it was something simple :) Now to put my new knowledge to work.

Who is online

Users browsing this forum: Google [Bot] and 30 guests