Converting boolean to string

Any one can help me to convert boolean variable to string? The boolean is in Text Exist activity - take text from web - and the result should go to a message box which is string. Help please.

1 Like

Use Boolean Variable.ToString

Ex: Medicaid.ToString

Thanks a lot, it worked. One more question, can I write the results in CSV file. This RPA is conducting a search for 200 records.

Yes you can. Check this out
Just make sure you have the results in a DataTable format to use this activity.

The process seams right, but the CSV file still empty. Any thoughts?

Now it writs the CSV, however, It just writs the true result, but not the false ones, while I need both. Any ideas?

your datatable stored as variable3 from Generate Data Table activity would be written into the csv file.
Can you check what is being done in the Generate Data Table activity? That should solve your problem

This is what happen:

You are writing only one string into a DataTable and then into a CSV.
Then next time you try to write anything the same way, the older CSV is gone as Write CSV overwrites the file each time. Ideally you would be having only one row every time I believe.

if it is only about adding one word into a csv file, you can try Append Line activity.

Alternately if you want to add a list of values, stored as a datatable into a CSV file, try Append to CSV activity.

Thanks a lot. I worked twice, but the third time it didn’t. Is that something related to the community edition? B\C I did not change anything in the RPA process.

No… The Community edition should not be a problem. There would have been something else that is going wrong. Try debugging with breakpoints and Write Line or Message Box to display the text that is getting written into the csv files.

Thanks a lot. It works. I solved it by selecting all cells in the result csv file and hit delete. Thanks for your support.

1 Like