- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 12:59 PM
I want to do a very simple action where I put an " ' " in front of every value in a certain column. So let's say I have a columns named ID, which contains values as the following:
ID
1234
2345
3456
I want to adjust the vales in the following way:
ID
'1234
'2345
I am now looping through the collection and I adjust the value of a row. However, when I save this in the original collection, the counter in the loop is reset to row 1 (because for blueprism it seems that we have a 'new' collection). See attached for the flow. This means that in my current setup I would have to copy each row after processing to a new row. Which mean I would first have to copy to temp collection, and then an append to existing collection action.
This seems to be A LOT!!! of hassle for an extremely small requirement...... I just want to add an apostrof to each value in a column. Is there anyone with a suggestion on how to do this easily.
Best,
Nanne
------------------------------
Nanne van der Wal
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 01:56 PM
If I have understood your requirement correctly, the below should update the collection 'in place' (Paste into an empty BP Process) it should look like this:
<process name="__selection__Community collection"><stage stageid="a0a61832-648a-4db7-86d6-32edfae7aacf" name="Start" type="Start"><display x="15" y="-105" /><onsuccess>3872c363-1adf-417f-bf93-1cae7821929e</onsuccess></stage><stage stageid="94dd51b1-fa77-47a1-9b98-40d1f15fc372" name="End" type="End"><display x="15" y="120" /></stage><stage stageid="6249d604-d3d9-4393-9a04-73ae2a695fc9" name="Collection" type="Collection"><display x="-105" y="-45" w="90" h="60" /><datatype>collection</datatype><private /><alwaysinit /><collectioninfo><field name="ID" type="text" /></collectioninfo><initialvalue><row><field name="ID" type="text" value="1234" /></row><row><field name="ID" type="text" value="2345" /></row><row><field name="ID" type="text" value="3456" /></row></initialvalue></stage><stage stageid="f228dddc-cdfe-4513-bca1-724ce16c8577" name="Prefix" type="Data"><loginhibit onsuccess="true" /><display x="-90" y="45" w="90" h="60" /><datatype>text</datatype><initialvalue xml:space="preserve">'</initialvalue><private /><alwaysinit /></stage><stage stageid="3872c363-1adf-417f-bf93-1cae7821929e" name="Loop Collection" type="LoopStart"><loginhibit onsuccess="true" /><display x="15" y="-45" /><onsuccess>92b62bb9-0fb2-4ab3-af6c-c8eca6aa296f</onsuccess><groupid>e94aeb6e-8d60-4962-8add-e79cb19fd8da</groupid><looptype>ForEach</looptype><loopdata>Collection</loopdata></stage><stage stageid="a7838465-1711-4814-bce4-eb153baf239e" name="Loop Collection" type="LoopEnd"><loginhibit onsuccess="true" /><display x="15" y="60" /><onsuccess>94dd51b1-fa77-47a1-9b98-40d1f15fc372</onsuccess><groupid>e94aeb6e-8d60-4962-8add-e79cb19fd8da</groupid></stage><stage stageid="92b62bb9-0fb2-4ab3-af6c-c8eca6aa296f" name="Add Prefix" type="Calculation"><loginhibit onsuccess="true" /><display x="15" y="0" /><onsuccess>a7838465-1711-4814-bce4-eb153baf239e</onsuccess><calculation expression="[Prefix] & [Collection.ID]" stage="Collection.ID" /></stage></process>
------------------------------
Tim Grassam
Consulatant
Blue Prism
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 01:35 PM
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 01:42 PM
So the counter is not reset, it is updated with plus one each time.
I am looking for another way to get a ' for each value. There must be a simpler way
------------------------------
Nanne van der Wal
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 01:49 PM
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 01:56 PM
If I have understood your requirement correctly, the below should update the collection 'in place' (Paste into an empty BP Process) it should look like this:
<process name="__selection__Community collection"><stage stageid="a0a61832-648a-4db7-86d6-32edfae7aacf" name="Start" type="Start"><display x="15" y="-105" /><onsuccess>3872c363-1adf-417f-bf93-1cae7821929e</onsuccess></stage><stage stageid="94dd51b1-fa77-47a1-9b98-40d1f15fc372" name="End" type="End"><display x="15" y="120" /></stage><stage stageid="6249d604-d3d9-4393-9a04-73ae2a695fc9" name="Collection" type="Collection"><display x="-105" y="-45" w="90" h="60" /><datatype>collection</datatype><private /><alwaysinit /><collectioninfo><field name="ID" type="text" /></collectioninfo><initialvalue><row><field name="ID" type="text" value="1234" /></row><row><field name="ID" type="text" value="2345" /></row><row><field name="ID" type="text" value="3456" /></row></initialvalue></stage><stage stageid="f228dddc-cdfe-4513-bca1-724ce16c8577" name="Prefix" type="Data"><loginhibit onsuccess="true" /><display x="-90" y="45" w="90" h="60" /><datatype>text</datatype><initialvalue xml:space="preserve">'</initialvalue><private /><alwaysinit /></stage><stage stageid="3872c363-1adf-417f-bf93-1cae7821929e" name="Loop Collection" type="LoopStart"><loginhibit onsuccess="true" /><display x="15" y="-45" /><onsuccess>92b62bb9-0fb2-4ab3-af6c-c8eca6aa296f</onsuccess><groupid>e94aeb6e-8d60-4962-8add-e79cb19fd8da</groupid><looptype>ForEach</looptype><loopdata>Collection</loopdata></stage><stage stageid="a7838465-1711-4814-bce4-eb153baf239e" name="Loop Collection" type="LoopEnd"><loginhibit onsuccess="true" /><display x="15" y="60" /><onsuccess>94dd51b1-fa77-47a1-9b98-40d1f15fc372</onsuccess><groupid>e94aeb6e-8d60-4962-8add-e79cb19fd8da</groupid></stage><stage stageid="92b62bb9-0fb2-4ab3-af6c-c8eca6aa296f" name="Add Prefix" type="Calculation"><loginhibit onsuccess="true" /><display x="15" y="0" /><onsuccess>a7838465-1711-4814-bce4-eb153baf239e</onsuccess><calculation expression="[Prefix] & [Collection.ID]" stage="Collection.ID" /></stage></process>
------------------------------
Tim Grassam
Consulatant
Blue Prism
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 02:00 PM
Hi, Nanne,
the solution is easy instead of calling Set Collection Field you put in calculation stage your formula:
"'"&[seriennummers.Seriennummer] and store it in [seriennummers.Seriennummer]. that's it! nothing else. You don't need any counter.
If you want to conditionally update it put the decision stage before calculation stage and that is it.
Regards,
------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 02:06 PM
Somehow my line of thought was stuck in thinking I would neet the Set Collection field action to make adjustments. But this is great, and so obvious..........
Thanks all!
------------------------------
Nanne van der Wal
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-10-20 02:09 PM
------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company
