Posted Tue, 15 Feb 2022 21:25:50 GMT by David Moore Co-Contract Administrator
I would like to display the total number of pages of a document in a result list.
here is my objective.
1. create page count index field in desired file cabinet for page count data destination.
2 configure workflow to extract page count number from the database and write to global variable.
3 add GV data to page count index field.

Is #2 possible, is there a query string needed to execute the data anyone done this before?
Could this operation be configured in autoindex?

There were a couple of threads on this topic from years ago but not much information.
Posted Tue, 15 Feb 2022 21:48:57 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist
This is certainly doable in an on-prem system using workflow (not sure about AutoIndex).  Let me know if this is on-prem and I'll dig into it a bit further and see if I can furnish you with more specifics of how exactly to configure it in workflow.
Posted Tue, 15 Feb 2022 21:52:06 GMT by David Moore Co-Contract Administrator
Yes it is our internal partner company On-Prem System. Thanks
Posted Wed, 16 Feb 2022 03:30:48 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist
<p>Hi David,</p> <p>It looks like the only challenge you're dealing with is configuring workflow to extract the page count number from the database so I'll just address that.&nbsp; Once you've created your global variable for holding the page count, you go into an Assign Data step and assign the global variable using an entry type of External Data.&nbsp; When you open the panel to configure the external data lookup, under database configuration you pick "Content", under table you pick the name of your file cabinet, and then over in the column drop-down on the right you'll see a most excellent list of system fields, including your most coveted "DWTOTALPAGES".&nbsp; Fill out the "WHERE clause" with your criteria so the lookup finds your document (using DWDOCID = 'GV_DocId' is the usual way, where GV_DocId is a global variable you've already populated with your document's DOCID) and you should be all set.</p>
Posted Wed, 16 Feb 2022 14:10:46 GMT by David Moore Co-Contract Administrator
That is what I was looking for. I will try it and see if it works out. Thanks for responding to this thread so promptly. It helps us build better systems.
Posted Thu, 17 Feb 2022 20:32:43 GMT by David Moore Co-Contract Administrator
I'm not getting the DWTOTALPAGES written to the global variable. I placed an email in the workflow after the assign data activity to display the data of the global variable token. Not getting any data. I tested with system data and that data gets written to the global variable.<br> <br> I'm going to need to add the page count data to all documents in the cabinet.<br> <br> config <a href="https://sumnerone-my.sharepoint.com/:f:/p/dmoore/EuCqf6M7MtZBvR1XmxsbcEoBy6_-XtoP4Kce2l8F2knvzw?e=0bVvXq">screenshots</a><br> <br> https://sumnerone-my.sharepoint.com/:f:/p/dmoore/EuCqf6M7MtZBvR1XmxsbcEoBy6_-XtoP4Kce2l8F2knvzw?e=0bVvXq<br> &nbsp;
Posted Thu, 17 Feb 2022 20:54:22 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist
<p>The WHERE clause you're using in the Assign Data step where you lookup the pagecount is incorrect because you've told it to find the DWTOTALPAGES where the DWDOCID is equal to the PageCount gv, which is empty, so it's not finding the document.&nbsp; You need to setup a gv called DocId, populate that at the beginning of the workflow by using an Assign Data to fill it with the DocId of the document in the workflow (let me know if you need help with that), and then make your WHERE cause be DWDOCID = 'GV_DocId'</p>
Posted Thu, 17 Feb 2022 22:12:29 GMT by David Moore Co-Contract Administrator
still cant get this working. I'm able to verify the doc ID is going to the GV I created at the beginning of the worklow. See screenshots&nbsp;<a href="https://sumnerone-my.sharepoint.com/:f:/p/dmoore/EuCqf6M7MtZBvR1XmxsbcEoB9J3p6rHOMXeO7vFV2-r79w?e=WGmbPf">LINK</a>
Posted Wed, 23 Feb 2022 20:00:34 GMT by David Moore Co-Contract Administrator
Jon, Do you have anymore ideas or could you possibly remote into my system and see if we can get this to work? Thanks.<br> &nbsp;
Posted Wed, 23 Feb 2022 20:12:51 GMT by Jon Weston File IT Solutions Sr Application Developer and RIM specialist
<p>Sorry, I didn't see your post last week.&nbsp; Did you update your WHERE clause?</p> <p>We could certainly do a Zoom meeting and screen-share so I can see what you've got setup - much easier/quicker than having me remote-in to your system.&nbsp; Shoot me an email at jon.weston@fileitsolutions.com and we'll set something up.</p>

You must be signed in to post in this forum.