You are viewing limited content. For full access, please sign in.

Question

Question

Query data not populating fields

asked on May 11, 2018

I am trying to populate a field on a template based on a SQL Table.  The unique identifier is already in a field on the template and I am trying to match up the name, using the Query Data tool.  I run the workflow and do not get errors.  The field I am trying to populate is still empty.   I reviewed a similar issue (link below) and my setup seems to be identical.  I checked for mismatches in the external table and the IDs match.

https://answers.laserfiche.com/questions/109895/populate-Fields-with-query-data#109927

I have attached my workflow.  Any help would be appreciated. 

Workflow.JPG
Workflow.JPG (35.64 KB)
0 0

Answer

SELECTED ANSWER
replied on May 14, 2018

As Bert mentioned, it looks like the first step is to look at what you're using to populate your database. If you've already confirmed that "ContactCode" values match up with Laserfiche's Entry ID values, then maybe it is a problem with permissions.

As a follow-up question, how are you populating the table with Entry ID as the ContactCode? I'd imagine you must have some Workflow process to enter the Entry ID into the target table as the unique identifier.

I would make sure the Workflow service user has sufficient rights to view the data in that table, and a Track Tokens activity inside the For Each Entry loop would be helpful to determine what values are actually being passed in the query.

1 0

Replies

replied on May 11, 2018

Do you know if the query is returning results?  Have you added a token tracker?  Have you tried a For Each Row activity to iterate through each row returned by the query?

1 0
replied on May 14, 2018

Bert,

Thanks for reviewing this.  No the Query Data is returning zero results (screen shot).  I do have a token tracker, but I do not have For Each Row to iterate through the rows.  It seems like the problem is that I am not getting results on the query, at least the first problem.

I found a workflow on answers that was trying to do a similar process to what I was trying to do.  I copied the format, but I am not getting results.

Any ideas on this?

https://answers.laserfiche.com/questions/109895/populate-Fields-with-query-data#109927

QueryDataResults.JPG
0 0
replied on May 14, 2018 Show version history

If it is returning zero rows, then it is not finding anything that matches in the DB.  Look at the Query and see if it needs to be tweaked.

 

Also, you are using the Current Entry ID as your key field value.  Did you populate the "ContactCode" column in your source DB with the LF Entry ID?

0 0
replied on May 11, 2018

Can you post a screenshot of the configuration for your Query Data activity? That would help narrow things down a bit.

0 0
replied on May 14, 2018

Jason,

Thanks for your help on this.  Here is a screen shot of Query Data.

QueryData.JPG
QueryData.JPG (72.6 KB)
0 0
SELECTED ANSWER
replied on May 14, 2018

As Bert mentioned, it looks like the first step is to look at what you're using to populate your database. If you've already confirmed that "ContactCode" values match up with Laserfiche's Entry ID values, then maybe it is a problem with permissions.

As a follow-up question, how are you populating the table with Entry ID as the ContactCode? I'd imagine you must have some Workflow process to enter the Entry ID into the target table as the unique identifier.

I would make sure the Workflow service user has sufficient rights to view the data in that table, and a Track Tokens activity inside the For Each Entry loop would be helpful to determine what values are actually being passed in the query.

1 0
replied on May 14, 2018

Bert and Jason,

I double checked I was pulling the right field for the ContactCode query data, and I was not.  I also added the For Each Row and Track Tokens actions.  I re-ran the workflow and it worked!!  Thank you for your help and patience with a workflow newbie.

Rolayne

0 0
replied on May 18, 2018

Sorry, I have to re-open this.  This workflow worked a couple times and then after more testing this stopped populating the name I was pulling from Query data.  When the workflow runs it seems to get stuck on the Query Data Activity.  I attached screen shots of the current Workflow and the errors.  Please let me know what I am doing wrong here.

Workflow for pulling data from a Query.JPG
Running Workflow.JPG
Query data stuck.JPG
0 0
replied on May 18, 2018

What is the starting rule for this workflow?

0 0
replied on May 18, 2018

Hi Miruna,

 

I am new to Workflows, so forgive me if I don't answer this correctly.  The starting rule I believe is the 'Find Entries'. I have attached a screenshot, please let me know if you need to see something else.

Starting Rule.JPG
0 0
replied on May 18, 2018

Hi Rolayne,

By "Starting Rule" Miruna means the event/action that triggers the workflow. For example, does this run automatically when a user creates a document, does it run on a schedule, etc.

1 0
replied on May 18, 2018

Jason, Thanks for the clarification.  I am not using a starting rule currently.  This workflow is still in the testing phase. So the starting rule is manual only.

0 0
replied on May 18, 2018

There is a cap on how many data queries can run simultaneously. So if you started a few of these workflows close together and they have a large number of documents to get through or if the query take a few seconds for each, it's possible that you're hitting that limit and your activity has to wait in the queue. I wouldn't worry about it in that case.

This could also happen if the server is under load.

You can press F5 to refresh the Tasks tab and if they get marked as completed, you can just ignore it.

0 0
replied on May 21, 2018

Miruna,

Thank you for your response.  I waited a day before trying the Workflow again and received the same results "The activity is waiting to run".   After waiting a while, the task still did not complete.  This took seconds when I had this working, I don't know what I did that made this WF no longer work.  I did not know about F5, so that is helpful - Rolayne

0 0
replied on May 22, 2018

Try taking a look in the Workflow Admin Console under Advanced Diagnostics\Tasks\All Tasks. It should list all tasks it currently has.

0 0
replied on May 23, 2018

Miruna,

 

Thank you, I have the workflow working now, I think the way I was testing was causing the issue, but your tips on troubleshooting the WF helped me realize that the WF was working correctly.  I appreciate your time on this.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.