Expand my Community achievements bar.

How to get Project Details from a Document Version Listener

Avatar

Level 4

Does anyone know how to filter a listener for document versions in Fusion?

If I try to get the project information such as document:project:categoryID I get the error:

Function 'getWatchQS' finished with error! fields is not iterable

So I'm having to watch ALL document versions in the system which seems bad. 


Any ideas?

 

Rob

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Community Advisor

To read it back, you're saying that you want to have a webhook triggered for document versions, but only if the document is on a project where a specific custom form is attached?

 

If so, then I would add a custom form to the document, and on that form have a calculated field that maps in your filter criteria (so project:categoryID if that's what you want), and then make a document webhook that triggers on the currentVersionID changing, and add that calculated field as part of your webhook filter.

Avatar

Level 4

Hello again @ChrisStephens 

This is what I was thinking, but the users that upload the documents aren't going to know how to add the custom form to the document. 

I don't know of a way to automatically attach a custom form to all documents. Is that possible?

Rob

Avatar

Community Advisor

I think the only way you could have the documented added automatically would be to use another Fusion scenario that would just attach the form to every document, which isn't ideal, but I can't think of another way. If someone else has one, I'm happy to be proven wrong on this one.