Hi, I’m having some issues to update the object class value on import. I have object class X which has a reference to object class Y & object class Z. Object class Y also has a reference to object class Z. The import file does not contain any information of object class z. I,m trying to update the value of object class Z through object class y before persisting the file but that is not working.
Hi! I assume that your file contains the value of object class Y? When importing an object class value as a object reference you need to add a runtime only property to your data source X temp, which might be Y temp. Then map the Y column of your file to Y temp. Add an Update Object after your Import Data action node, to set the reference to Y. You can use update all objects in X temp and you have to use a function on the reference to Y for this: Add Y (which contains all Ys) as a Parameter and set a filter where X temp.Y = Y.(the value you would like to import) and return Y[0]._id. Hope this will help
Yes, file contains value of object class y. I’m doing the same thing and it work.
I need help with updating the object class Z (file does not contain any information of object class Z). Object class Z has a reference to object class Y. I want to update the value of object class Z on import through object class Y. Can I do that?
Right now i’m updating the value of object class Z after persisting the file & it works perfectly. But I wanted to update the object class value before persisting the imported file.
Here is the action.
I want to update the license information before persist action node. License don’t have a direct connection with the platform (import file) but Field do have. So trying to update the license information from field data on import.
The action in the screenshot is updating the license information but after persisting the file.
I hope that makes it a bit clear now.
Based on the screenshot, it seems as you are updating the platform objects, and setting the reference to Field correctly (before the persist).
Moving to your next question. At this point (before the persist) you have a datasource with correct references to corresponding field. I guess the problem is that you want update all platforms, setting the property platform.license = platform.field.license?
If that’s the case, add a new Update Objects (of platform (import)), setting platform.license the following way using the Function editor:
Add license as Function parameter, by adding that data source and filter it by license.id = platform(import).license.