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

Question

Question

Creating folders using Workflow and a spreadsheet

asked on January 15, 2014 Show version history

Good morning,

 

This seems to be easy but can't quite land on getting it working.  Basically we have an xls with Property File information.  PIN's, Street Name, House Numbers, etc.

 

What we want to do is simply create a folder structure for all this information.  We want Workflow to read each row in the Spreadsheet and create a certain folder structure (based on the information across the row).  If I do a Query Data activity and can setup the ODBC and do a For Each Row.  However it only goes to the first row.  If I use a Custom Query I am unfamiliar with SQL syntax.  

 

Basically I have a Create Entry inside the For Each Row activity.  The For Each Row activity is getting its info from the Query Data results.  But for Query Data is seems it only goes through one row and the Custom Query I am not sure of.

 

Any quick ideas?  Again it seems like it should be something simple and it is probably something I am overlooking...

 

Thanks!

 

Edit:  I have uploaded a few pics.  Maybe I am going about it the wrong way but in summary I have the following.

 

I create a counter token and assign it the value of 1.

 

Then I Query Data and only retrieve the row of the according to the value of the counter token.

 

Then I create two entries.

 

Then I increment the counter by 1.

 

Then I assign the counter token to be the incremented value.

 

All of that besides the first creation of the counter variable is inside a Repeat.  Just for testing the condition on the repeat is just if %(Counter) is less than 100.  Don't need to do them all for testing.

 

I am able to get the first row done.  The two folders create but it then does not move on to the second row of the xls.  

 

Probably something simple..

Pic 1.jpg
Pic 2.jpg
Pic 3.jpg
Pic 1.jpg (100.96 KB)
Pic 2.jpg (49.76 KB)
Pic 3.jpg (59.75 KB)
0 0

Answer

SELECTED ANSWER
replied on January 15, 2014 Show version history

You have not read the setting you are using. It is set to grab the first [Number from counter] rows. When you increment the counter, you are actually telling it to grab two rows, then three rows, then four, and so on. The first row in that Query will always be the same in these cases.

 

To remedy this, try having it grab all rows, remove the 'Repeat' activity, then use the "For Each Row" activity and have the 'Create Entry' activities set to use the "ForEachRow_[ColumnName]" Token to have it create the folders based on the current value you are referring to in that row. 

 

The token name may be wrong in my example, but it sounds like you are using the first result in your create entry activities and not the current value you get from using the For Each Row activity. 

1 0
replied on January 15, 2014

That was it.  I actually had two different versions, one being a For Each and one being a Repeat.  Was trying many different things but was using the Query Data activity to fill in my info instead of the For Each.  

 

Thank you for the response.  Got things working as needed and appreciate it.

0 0
replied on January 15, 2014

Happy to help.

 

This is a common problem you will face in setting up activities to make use of multiple values you get in other activities.

 

It is important when something does not work to go over and check the tokens you are using. It is common to find that the workflow is actually doing exactly what it is told to do, you just told it what to do in the wrong way. This is the first thing I check when functionality does not work as expected when their is no error message reported. 

0 0

Replies

replied on August 25, 2016

Hello Chris,

 

I am trying to do something similar. Do you have an example of this workflow?

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

Sign in to reply to this post.