how to delete rows from collection

avvamma

New Member
Hi,

I have requirement
  • Open xsl file and delete all rows where email address (in some column) contains “Val1” or “val2”.
  • I have used MS excel VBO to get in to collection and looped that collection and kept decision whether [clo.fieldname] = val1 or val2 using instring if the decision is true then deleting the rows from the collection else it its looping back again.
  • In this case if the column value is not having val1 or val2 i am connecting back to loop but here its always checking with 1st row its not looping.
  • Any body has idea how to resolve this?
 

VJR

Well-Known Member
In this case if the column value is not having val1 or val2 i am connecting back to loop but here its always checking with 1st row its not looping.
Here the 'No' branch of the Decision stage should point to the End Loop stage and not the Start Loop.
 

VJR

Well-Known Member
Hi BenKaba2,

- At first delete the blank row using Remove Empty Rows (or Remove Null Rows if necessary).
You can also use the Delete Row of Collection VBO (not Utility Collection) here.
- Now the row that says "Fund Name" will become the first row
- Now use 'Set Column Names From First Row'
 

VJR

Well-Known Member
From the error message it looks like the function can take 1 or 2 parameters but both need to be numbers. Market Price column may not be a Number data type and hence throwing an error.
 

BenKaba2

New Member
ok I see the market price is defined as $34.444, I think the dollar sign is not understood by blue prism. I will get rid off the $ sign maybe it will resolve the issue.

Thank you VJR
 

Tolani

New Member
If you have a large number of rows in a collection, I will suggest you use a "Utility - Collection Manipulation > filter collection" action and filter based on the column name e.g column1 <> 'Val1' AND column2 <> 'Val2'. You don't need to put the column1 in square brackets e.g [column] <>'Val1'.
 

VJR

Well-Known Member
ok I see the market price is defined as $34.444, I think the dollar sign is not understood by blue prism. I will get rid off the $ sign maybe it will resolve the issue.

Thank you VJR
The data type of the column may need to be changed to a Number.
 

BenKaba2

New Member
View attachment 1542056508958.png

Hey
I am trying to run my process in the control room, but it does not identified the save button while running. But everything work perfectly when I run the process in the studio. Did anybody has this problem before when running the process in control room?
 

VJR

Well-Known Member
View attachment 2482
View attachment 2483

View attachment 2484

Hey
I am trying to get rid of the $ sign in the column in my collection, but some how it not possible for me to override the data back to the column without the $ sign. Anybody know why ?
The error is occurring because in the Store In field you have provided only the collection name. Supply it in the format [CollectionName.ColumnName].
But in any case even if you remove the $ sign, the Market Price column data type is still a Text and the RndUp seems to take a Number.
 

Bharathwaj

New Member
Hi @VJR ,
Can you please help with below requirement.
I have 2 collections col1 and col2. Now i need to match the value of a column in Col2 with Col1. If the value the is present in col1 delete the row from col1. How should I proceed?
 

sahil_raina_91

Active Member
Hi @VJR ,
Can you please help with below requirement.
I have 2 collections col1 and col2. Now i need to match the value of a column in Col2 with Col1. If the value the is present in col1 delete the row from col1. How should I proceed?

Loop col1
Use "Collection contains value" in Collection Manipulation VBO. (Here col2 will be the Input)
If True. Delete Row
If False. Do Nothing
Loop End col1
 

Bharathwaj

New Member
Loop col1
Use "Collection contains value" in Collection Manipulation VBO. (Here col2 will be the Input)
If True. Delete Row
If False. Do Nothing
Loop End col1
Hi,
Thanks for that!!
Should I not loop the col2 also? Because i need to match the value of a column in col2 to col1? Kindly suggest.
 
Top