Hello,
I want to take a certain action on the lowest sub-task given a higher parent within Fusion. When the task I am looking for is directly underneath the parent task there is no issue getting this information with a quick search within Fusion. However, in some cases I have multiple layers between one another where the search is on a grandparent task instead on a direct parent. For instance, I can have different layers such that:
City X
Restaurant 1
Table 1
Table 2
Etc.
Restaurant 2
Table 1
Table 2
Etc.
Restaurant 3
Table 1
Table 2
Etc.
City Y
Restaurant 1
Table 1
Table 2
Etc.
Restaurant 2
Table 1
Table 2
Etc.
Restaurant 3
Table 1
Table 2
Etc.
If I want to write an action on the tables based on a given restaurant this can be easily facilitated by searching the table within the restaurant. However, if I want to take an action on all "Table 1"s for all the restaurants within a city I have no direct parent relationship. Is there any way to skip layers between the task I want to do the action on and the task that triggers the action?
I cant quite figure this one out so thank you in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @NCorver
Thank you for sharing!
So I see two ways:
parent:parent:name = XYZ
OR:1:parent:parent:parent:name = XYZ
IF(ISBLANK({parent}.{parent}.{parentID}), {parent}.{parentID}, {parent}.{parent}.{parentID})
#2 might be preferable because then you have the ID right in the event bundle.
I can't tell if you really need to access the (great-)grand parent tasks since you only mentioned closing what I understand to be sibling tasks. If you only need to operate on siblings, you can pull {parent}.{tasks} of the task that triggered the event.
Hope this helps!
@NCorver Do you want to search into the list of tasks, right?
Did you use the search module for the tasks?
Views
Replies
Total Likes
@DimitrisGoudis yes, I want to search for a list of task dependent on a higher level parent.
I have used the search module but my issues is that I only know how to refer to the parent that is directly above the task I am searching for. When I want to refer to parents that are X amount of higher levels, I do not know how to configure this in the search module.
Views
Replies
Total Likes
I can't tell what your usecase actually is (in the sense "when event X occurs I need to do Y")
So in general, you can refer to up to 4 levels of hierarchy, e.g. the name of the task's grandparent is parent:parent:name
In the search module you'll need to click the map button and manually enter this - you can use the "references" or "collections" section to do this.
There may be a better approach - can you explain your usecase?
Views
Replies
Total Likes
Hi @Sven-iX ,
Thank you for your reply! I will definitely try to get this to work as this seems to be what I was looking for. Also makes sense why I could not find it in the options of the list in the module.
As per my use case specifically it involves three hierarchies where certain tasks need to be deleted/marked as complete based on input. So to further elaborate I have the following structure:
Grandparent: Product code of Product 1
Grandparent: Product code of Product 2
Both products have to follow a certain step by step creation process where the process is always the same. However, based on business prerequisites sometimes a product can already start with task Z as the previous tasks have already been done but in some cases the product has to start a new with all the task yet to be filled out. So either I want to delete Task X and Y for the products it is not relevant for, or mark them as complete as these steps are already been done before. With the unique identifier in this set-up being the product code that determines which steps are relevant.
I hope this helps with the use case, if you have further question, please let me know.
Views
Replies
Total Likes
Hi Niels
Views
Replies
Total Likes
Hi @Sven-iX,
Fair questions I will try to answer them all.
I hope this answers your questions, feel free to ask more if needed!
Views
Replies
Total Likes
Hi @NCorver
Thank you for sharing!
So I see two ways:
parent:parent:name = XYZ
OR:1:parent:parent:parent:name = XYZ
IF(ISBLANK({parent}.{parent}.{parentID}), {parent}.{parentID}, {parent}.{parent}.{parentID})
#2 might be preferable because then you have the ID right in the event bundle.
I can't tell if you really need to access the (great-)grand parent tasks since you only mentioned closing what I understand to be sibling tasks. If you only need to operate on siblings, you can pull {parent}.{tasks} of the task that triggered the event.
Hope this helps!
Hi @Sven-iX,
Thank you for the quick reply! The second option feels like the most sustainable one that I didnt think about earlier, great insight. This way they are included in the bundle indeed and I can reuse the ID later down the line in my fusion flow. I already tried this and it works as intended.
One more question just to make sure; this logic of using the parent.parentID cannot be reused in the search module correct? If I try this the module tells me it does not support the field, which makes sense otherwise it would be in the list of options. I just wanted to double check with you to make sure.
Views
Replies
Total Likes
Hi @NCorver
the search module is a "user friendly" module - and no you couldn't search by that. You'll need to use the customAPI module.
In the module you'd add query arguments to match you search.
Note if you need to you could add another level
{parent}.{parent}.{parent}.{parentID}
Views
Likes
Replies