Solved

botflow set to run 1 time instead of Records 1 to end

  • 5 April 2021
  • 6 replies
  • 13 views

Badge +2

When I load the data for a botflow it is only setting itself to Run 1 Time.  I want it to run all the records I load but I am going to run it using RPA central so I do not want to have to change that manually.  

Is there a way to change the default to run all instead of run once?   Only happens if I ask  the botflow to load excel into a database.  ('open data')

icon

Best answer by DeeButler 8 April 2021, 01:34

View original

6 replies

Are you using the loop option to reference something in the Excel data that you imported?  I'm not 100% positive that a loop is necessary, but it could resolve the issue.

Badge +2

No loop, just loading the data into a database using the import data from excel - Data Open - option.


Not sure where a loop would be placed?


Just to describe a little more....  


I am trying to load data automatically when Nintex starts the script from RPA Central.  So the script is started and then the data is loaded in the sript.  Somehow it sets the run times to 1 instead of running for records 1 to end, or all records.  


If i change from run once to run all and then save the script and open the data again it doesn't set it to one.  But if I load a new spreadsheet it sets it to one.  So I was hoping there was some sort of default setting I was not aware of.  

If you put a loop immediately after the Open Data, you could then specify the "Exact times" that it loops.  In the "times" field of that loop, you could say[*TOTAL_RECORDS].  This "variable" is found under the magic wand, Botflow, Total Records.


 


So import data


loop


place column 1, record 1 into website.  place column 2, record 1 into website, place column 3, record 1 into website.


end loop


 


Now it will repeat those same steps for the number of records you have.


 


Does that help at all?  Someone else can pitch in if I'm leading down the wrong path.  haha

Badge +2

Not sure where you are going with that. I'm trying to get the data to advance as part of the normal flow, as it naturally does but isn't opting to read all records, just the first one and I don't want to have to change that manually since my script is automated. RPA will advance the data to each field naturally and my script only reads one data item per script rotation.


Start script, read data, run task using that data, end script, move to next data and repeat all steps.  So I really am having trouble understanding what a loop might do in this case.


 

Badge +2

I spoke with Support and development  @devinweber You were right about requiring a loop to maintain the records if loading data in a script, after starting the script. You must mark the data record within the script when you are finished with each record.


So.


Start (script)


Loop


Load Data


Look for first unprocessed record- skipping those already processed


run logic - Do something fun and exciting


mark record as done - continue with loop until you have read all the data


At the last record exit the loop


End Loop


End (script)


Things to be aware of:



  1. If you do not loop correctly you will get a Nintex popup at end of script or end of reading one record.  Move the loop around to get rid of those messages.

  2. if you are using a "Go to the Very End" action in the Error section you will have to handle that differently.

  3. If you are using "Go to the Very End" in a task that will also need to be handled differently, I have to remove my subtask and do the task at the same level as my loop.

  4. If you have many, many subtasks this could change the programming you need to do quite a bit.


So until NIntex has a fix for autoloading data and the data being stuck at First Record, I may opt-out of RPA Central for scheduled jobs and choose .bat files.


If anyone else has something clever they've done please let me know.


 


 

This has been a problem for a long time when using the 'Open Data' action in the bot. If you open the bot from a .bat file with the data in the string with the trigger /all records it works, but now with RPA central I cannot seem to open Bots from a network location without losing email credentials.


 


I been asking for a long time for there to be an enhancement to the 'Open Data' action so you can set it to run all records instead of the default 1 record. Its come to the point where i prompt the users after the data is loaded to instruct them to change it to 'all records' and then restart the script. 


 


Support provided a very elaborate loop through the records which is logical but marking and moving through the records within the script is not an elegant way to do it and you run the risk of missing/skipping records. The whole point of RPA is to run from Start >> End mark the the record and repeat until out of records

Reply