I’m struggling with removing an item from a list. I have an object that looks up to itself in a many to one relationship.
This relationship can change. To handle the change, I’m using a database trigger to capture the change in the object vs in the UI. The reason for this approach is to avoid creating ton of workflows.
When the relationship is changed, the backend workflow doesn’t perform the remove. The action searches for the previous parent and then removes the previous version of the object from the field which contains it in a list. However, it doesn’t work.
I’ve tried EVERYTHING. I suspect there’s something about the remove function I don’t quite understand. Do I need to remove the item from the list by its index number on the list? Or, can I just pass in the object to be removed?
If I have to use an index number, how do I get the number?
Just updated the privacy settings to make all of the fields editable to the user via anyway possible. Didn’t resolve the issue. Here’s the privacy setup for the object.
Here’s the workflow plus a small diagram of the object. It looks up to itself–objects can be nested. I need to be able to remove a child from the list of Child Actions. I can add it easily enough. Removing is proving to be far more difficult.
I think that you dont use the correct value. This action refer to the do a search item returned I think. If the parent is the trigger8ng object, you should just use Action now I guess
The triggering object is the child. So, the logic needs to go up to the parent to remove the reference to child from the former parent.
Essentially, I’m re-parenting the child. There’s a reference to the parent on the child which, when it changes, triggers the workflow to add the child record to the new parent and to remove the child from the previous parent.
So this is what I said. Actually you are doing a “Do a search for…” to find parent. This is fine. But in remove, you are using This action. But you should use Action now. This action refer to the item found in Do a search for, not to the triggering Action (the child).