Searching for Projects missing a specific Project form (category). Or listing all project forms in Fusion.
I'm creating an automation to add a specific project form to any project that doesn't already have it. I have a search module that searches all active projects and returns:
ID
Category ID
Name
Status
References:
Category
Collections:
objectCategories
Since projects can have more than one form, I included objectCategories from Collections.
In the return bundle, everything makes sense except the objectCategories. There are 2 and neither are the form listed in the CategoryID section. In fact, I can't find these IDs anywhere. What are they, where did they come from? None of my forms of any kind have these IDs.I went and looked at the project and it has 2 forms. The form IDs are: 58b6fe780027736f3c7dc222dc334979 and 5ed7c604024fe585b29e5894d8da05a9, neither of which are in the objectCategories section.
I created a project report with columns for name, Category ID, Category Name, objectCategories (ID), and objectCategories (category.name).
If the objectCategory references the form, why do the IDs NOT match? Should I reference the Category ID or the objectCategory ID?
For example:
Is the ID of "Project Form | Project" 5ed7c604024fe585b29e5894d8da05a9 as in the Category ID?
or is it 6102ee5c0004298052d658bf37d89a41 as in the objectCategories?
This is pretty confusing.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi Randy,
I struggled with this exact same thing trying to enforce a set of 3 custom forms onto every project. I am not sure from a search function, but from a READ RECORD object, show advanced settings, and for collections, click the slider to MAP and put in: objectCategories:category:*
this will get the ID of all of the custom forms attached to the project. If you use the automatically mapped collection, and not manually mapping it, near as I can tell you get an ID for some type of connection record, that links the project to the custom form, not the ID of the custom form itself.
Once you have done this, you need to create a variable using a SET VARIABLE object to contain the array of form IDs. Name your variable, I have lifetime set to one cycle, then for the value, use: map(#.objectCategories[];category.ID). The # would be the object number of your READ RECORD object that pulled the custom form values (you should be able to select this from the list of variables you can select when clicking into that box to update it).
Now you need to iterate through that array to determine what is or is not attached. use an ITERATOR object and for the array in that module, add the ID's of the custom forms you are wanting to be attached as values. On the path exiting that module, add a filter with the first value being your initial array you created with the SET VARIABLE object, select the comparison of: Does not contain (case insesitive), and the second value of VALUE from your ITERATOR object.
You will now have only missing forms continuing along the execution string which goes to a WORKFRONT MISC ACTION module. set it to a Record Type of Project, and Action of: assignCategories. objID of the record you are updating, and the objCode of the record being updated. under categoryIDs, select the VALUE value from the ITERATOR record.
it works really slick once i figured this out. I have a webhook I setup for Workfront for any new or changed project and it will evaluate this to ensure every project record will always have the 3 required custom forms attached. This is handy as I have one custom form that I don't give anyone access to, that just stores values on the project that I can use for various integrations, like storing the GUID of the linking object in the other system. The process defined above is how I can attach it and no one has access to it to mess up the values.
This ends up with a process that is only 4 objects long, with 1 filter, and no wonky data adds to the Workfront Object to make another finding mechanism.
If you have troubles with this I can get some screenshots to help, but this has worked great for me.
-Aaron
according to the API explorer in the object category section, you should reference the object category's categoryID rather than its ID, if you plan to match it with a custom form ID. Are you able to do that and does it return better values (that actually match something you have)?
Views
Replies
Total Likes
Hi Skye,
Good catch, unfortunately, I can't find a way to get that in Fusion.
Result:
I added a categoryObject.categoryID column to the report and it looks like it matches up. Thanks for that tip!
So I'm guessing I have to use the "objectCategories.ID" in Fusion and manually match it up with the "objectCategories.categoryID" in Workfront to know the name of the form I'm looking for when there are multiple forms in a collection.
That's WAAAY harder than it should be!
I'll need to look for 6102ee5c0004298052d658bf37d89a41 because that is the "objectCategories.ID" of the form that has the "categoryID" 5ed7c604024fe585b29e5894d8da05a9.
Which begs the question, Why more than one ID? Why make it so hard?
Views
Replies
Total Likes
Scratch That idea, the objectCategories.ID of each bundle is different even if it's the same form I'm looking for.
Is there no way to get the ID of a project form when there are more than one? I need to find projects that do NOT have the form ID 5ed7c604024fe585b29e5894d8da05a9.
Views
Replies
Total Likes
well... that might be an exists statement (or notexists statement) for me, working outside of fusion in a report, but here we are inside of fusion trying to use it to get the same result. I'm still a fusion beginner so it's a bit hard for me to see what you did to get here. You're certainly welcome to upload a blueprint if you think it might help or if you're just curious to see whether we can share blueprints of scenarios to troubleshoot.
In the most general terms though, it feels like what you're trying to do might be covered in this module: https://one.workfront.com/s/learningpath4/universal-connectors-and-routing-in-fusion-MCNYZ474LYKNDSD... -- but I really couldn't say for sure. I just remember doing the pokemon exercises and having to pull stuff out of a collection.
Views
Replies
Total Likes
Hi Randy,
Plan B: add a checkbox parameter with the same name as the form to the form, defaulting it to true, save, confirm it propagated, then in Fusion, change your search to return every object that is missing that true value (and by 1:1 deduction, that form), then add it.
As a bonus, you can then create a standard Workfront Report to easily and instantly visualize every object that is missing that custom form (and for those without Fusion, simply bulk update them to add the form).
Regards,
Doug
Views
Replies
Total Likes
Hey Randy,
Doug's solution will work, and I've used similar helper fields like that in the past to facilitate form maintenance.
If you have your heart set on searching for "Form xyz not attached," the below custom API call module would return those records. The highlighted parameters could also be used as a filter between two other modules if you are working with a collection of records that was returned through some other method.
Views
Replies
Total Likes
Thank you Skye, Doug & Bill,
I think I will use Doug's solution… with a small twist. I'll create a "Form Name" field that just lists the name of the form. Then: If "Form Name" NOT contains "Project Form | Project" (or any other form name) then… etc.
This way I can re-use the same field on all forms instead of a different field for every form.
It still puzzles me why I cannot list the ID of all forms on a project, and why the objectCategories IDs don't match the category IDs.
I think I'll open a ticket and ask how this works for some clarity. I'll share if/when I get a good answer.
Views
Replies
Total Likes
Hi Randy,
I struggled with this exact same thing trying to enforce a set of 3 custom forms onto every project. I am not sure from a search function, but from a READ RECORD object, show advanced settings, and for collections, click the slider to MAP and put in: objectCategories:category:*
this will get the ID of all of the custom forms attached to the project. If you use the automatically mapped collection, and not manually mapping it, near as I can tell you get an ID for some type of connection record, that links the project to the custom form, not the ID of the custom form itself.
Once you have done this, you need to create a variable using a SET VARIABLE object to contain the array of form IDs. Name your variable, I have lifetime set to one cycle, then for the value, use: map(#.objectCategories[];category.ID). The # would be the object number of your READ RECORD object that pulled the custom form values (you should be able to select this from the list of variables you can select when clicking into that box to update it).
Now you need to iterate through that array to determine what is or is not attached. use an ITERATOR object and for the array in that module, add the ID's of the custom forms you are wanting to be attached as values. On the path exiting that module, add a filter with the first value being your initial array you created with the SET VARIABLE object, select the comparison of: Does not contain (case insesitive), and the second value of VALUE from your ITERATOR object.
You will now have only missing forms continuing along the execution string which goes to a WORKFRONT MISC ACTION module. set it to a Record Type of Project, and Action of: assignCategories. objID of the record you are updating, and the objCode of the record being updated. under categoryIDs, select the VALUE value from the ITERATOR record.
it works really slick once i figured this out. I have a webhook I setup for Workfront for any new or changed project and it will evaluate this to ensure every project record will always have the 3 required custom forms attached. This is handy as I have one custom form that I don't give anyone access to, that just stores values on the project that I can use for various integrations, like storing the GUID of the linking object in the other system. The process defined above is how I can attach it and no one has access to it to mess up the values.
This ends up with a process that is only 4 objects long, with 1 filter, and no wonky data adds to the Workfront Object to make another finding mechanism.
If you have troubles with this I can get some screenshots to help, but this has worked great for me.
-Aaron
Thanks @Aaron Abbott‚ , this is great. It works but for one issue which I'm sure is because of something I chose incorrectly.
For the example, the "Project Form | Project" form is the one I want to add if it's missing (5ed7c604024fe585b29e5894d8da05a9)
I have 4 Test projects:
One with the Project form and another form, one with just the project form, one with just a different form, and one with no forms.
The problem is the one with the Project form and another form is passing through the filter and getting the project form added a second time. It doesn't mess anything up as the form info stays but it wastes time adding adding a form that's already there. Below are screen shots of what I interpreted your instructions to be:
Set Variable Module
Iterator Module
Filter after IteratorAdd Form action module
As you can see below, bundle 1 is getting through the filter even though it has the correct form plus another form attached.
Can you see what I did wrong from this?
Views
Replies
Total Likes
here are similar screenshots that show what I have. I think the filter is where you are running into issues.
here is where i create my array from the project in question:
then here is the iterator setup:
then here is my filter:
by including the ITERATOR value rather than the discrete value, it will use the one that is on that particular iteration rather than getting the extras that met part of the filter. this ensures it is comparing only 1 variable at a time against the ones in question, then the UPDATE RECORD object looks like the following:
all total, this ensures it is only ever testing 1 item at a time, and only passing ones that dont match that need to be added through. no double attaches, just the missing ones. This will also set you up to be ready to add more custom forms if the need arises, all you need to do is add 1 more test to the Iterator, and you are updated to handle your new form.
Hopefully this gets you to the finish line!
-Aaron
Views
Replies
Total Likes
Hi,
we mostly solve that via a filter:
Views
Replies
Total Likes
This one didn't work either. It should have blocked bundle 3 and 4 as they already had the Project Form 5ed7c604024fe585b29e5894d8da05a9
Views
Replies
Total Likes
Two questions:
I think changing my collection search from "objectCategories:category:*" to the one you use, "objectCategories:*" did the trick! It's more data being pulled but it seems to work, Thanks!
I really appreciate the help you all have offered. Hopefully, others will learn from this thread too.
Views
Replies
Total Likes
You could also use objectCategories:categoryID to get the collection, this should also work.