Solved

Getting Started with Building an Automation

  • 14 December 2023
  • 19 replies
  • 112 views

Userlevel 1
Badge +3

Hi, I have a question with the Homework for the “Getting Started with Building an Automation” section. I have completed it already it the bot has ran successful. But I noticed that the header has duplicated it’s self. I’m not sure why this has happened and how to run the bot with out putting the header in twice. For the homework portion I also noticed that it overwrites the demo - Delayed status...could it be because I used the name “Default”? Or is that correct and the homework portion just overwrites the demo. For my condition I used “Not equal to” for the “If” package listed in the “Read Table and Loop” step. 

 

Demo - Delayed status
Homework - In Progress and Complete Status
Homework -In Progress and Complete Status

 

icon

Best answer by Aaron.Gleason 15 December 2023, 16:40

View original

19 replies

Userlevel 4
Badge +6

Log text to file will append or overwrite the file, depending on the option in your last screen shot. When doing this kind of logging, I typically change the Log text to file that writes the headers to “Overwrite existing log file”. This ensures a clean file for each run with no duplicated headers.

Userlevel 1
Badge +3

Thank you for the reply. I forgot to mention that I did try flipping those statuses. I originally had the option set to “Append to existing log file” and then tried to use the “ Overwrite existing log file” and the results only gave me one record when there are actually 16 records for the status Complete and In Progress

 

Userlevel 4
Badge +6

Correct. Only change the one writing the header to “overwrite”, keeping the one writing the data to “append”.

Userlevel 1
Badge +3

I think I am confused. Are you talking about this section? Because choosing Append gives me the duplicate headers and choosing Overwrite I get the screen shot that shows one row without the header and the other 15 rows. I guess I am still not comprehending 

 

Userlevel 4
Badge +6

Yes. Your first “Log text to file” writes the headers to the file. Mark that as “Overwrite existing log file”.

The second “Log text to file” (shown above) needs to be set to “Append to existing log file”.

If your automation only has one Log text to file, just set it to “Append” and clear out the file each time manually. (There are other ways to do that as well.)

Userlevel 1
Badge +3

I have deleted the excel file and went and ran the bot with the “Append to existing log file” and then deleted the file again completely and re-ran the bot with the second option “Overwrite existing log file” but still get either One...duplicate header listed or two...no header and one row. I am still lost on following with your response. In creating the homework for the Delay status I have everything the same except changing the condition to not equal to Delayed 

Userlevel 7
Badge +13

Hi @none 4934 ,

 

I hope the $TableRow[0]$ in here contains the header values. If that's so, you should not mention that while Appending to the file. This will duplicate the Header values.

 
Userlevel 1
Badge +3

Hi @Padmakumar capture the table that includes the header but I tried both append to existing log file and tried again with overwrite existing log file as shown above in screen shots. I created two different bots, one was following the demo which worked fine. The second bot is the homework exercise, is where the header duplicated it’s self. 

Userlevel 1
Badge +3

both bots are both created the same except I put the homework condition for the IF package set to does not equal to delayed 

Userlevel 1
Badge +3

@Aaron.Gleason 

 

Userlevel 4
Badge +6

Do you have any other Log text to file actions other than on line 14? Your Steps are collapsed, so I can’t tell.

Userlevel 1
Badge +3

 

Userlevel 4
Badge +6

Thank you. The template CSV file has a header… and so does the table of data you are capturing from the web page. That’s why you were getting duplicate headers.

To resolve this, leave your Log text to file as “append”, and add another action after step 10: Data Table: Delete Row. Remove row index 0 (zero). This removes the header row from the table you captured in step 10.

Userlevel 1
Badge +3

Not sure if this is what you mean

 

 

Userlevel 1
Badge +3

did step above and got this error 

 

 

Userlevel 4
Badge +6

The parameters should be your table name for the first field, and the number zero (0) for the index.

 

Userlevel 1
Badge +3

🙀 smh...finally got the duplicate row removed. Thank you. I thought I had to copy the variable of the index 0.

Userlevel 4
Badge +6

I notified the person who recorded the video. We will have this step added to the lesson soon. Apologies for the difficulties.

Userlevel 1
Badge +3

Thank you again and no worries...sometimes it is hard to explain things in a forum to where a person gets stuck at. But I appreciate all of your help

Reply