Need help to update a collection

Martin76

New Member
Hi guys, this has been driving me nuts for ages now and I know it might seem really basic but I don't remember it ever being covered in the training course I'm taking. Basically I have built a process that logs in to an order system, gets items from a work queue, places an order and then captures the reference number. The reference number I am sending back from the 'capture reference' Business Object to the Process but I am stumped as to how to add this data to my existing collection as the column name does not exist. I keep getting the error 'Field Data.reference-number not found' and I know this is because it doesn't exist in the Current Values tab in the collection.

The best I can do is store this returning data into a separate data object in order to not disrupt the process but this doesn't really help me as I need to be able to view the reference number in the control room via the data logs of the work queue. Can anybody help me append this returning data to my existing collection? Would really appreciate the advice. Thanks
 

Sachin_Kharmale

Active Member
Hello Martin,

If you got the order refference number from your object
And in process you have Collection Collection contains filed check the Data type of filed if it is text or number
If text thats fine if nunber then convert your refference number to number Data Item

For adding Refference nunber to your collection

Use Blue prism Collection Internal VBO
Action add Row give input as your collection name

IT will add new Row to your collection

Then use calcuation Stage and put your refference number to collection

Like
[collection. Filed] =[ refference Number]

It will store order refference number to the collection
 

Amarender

Member
Hi Martin

As far as of my understanding for your explanation, is that the collection does not contain the column name ("reference-number") which you have specified for storing the read data into collection with Field Name ("reference-number").

If that is the case, we have two methods for doing it.
after getting the data in collection for the Excel file please add a new field (Column-Text)
Hi guys, this has been driving me nuts for ages now and I know it might seem really basic but I don't remember it ever being covered in the training course I'm taking. Basically I have built a process that logs in to an order system, gets items from a work queue, places an order and then captures the reference number. The reference number I am sending back from the 'capture reference' Business Object to the Process but I am stumped as to how to add this data to my existing collection as the column name does not exist. I keep getting the error 'Field Data.reference-number not found' and I know this is because it doesn't exist in the Current Values tab in the collection.

The best I can do is store this returning data into a separate data object in order to not disrupt the process but this doesn't really help me as I need to be able to view the reference number in the control room via the data logs of the work queue. Can anybody help me append this returning data to my existing collection? Would really appreciate the advice. Thanks
Hi guys, this has been driving me nuts for ages now and I know it might seem really basic but I don't remember it ever being covered in the training course I'm taking. Basically I have built a process that logs in to an order system, gets items from a work queue, places an order and then captures the reference number. The reference number I am sending back from the 'capture reference' Business Object to the Process but I am stumped as to how to add this data to my existing collection as the column name does not exist. I keep getting the error 'Field Data.reference-number not found' and I know this is because it doesn't exist in the Current Values tab in the collection.

The best I can do is store this returning data into a separate data object in order to not disrupt the process but this doesn't really help me as I need to be able to view the reference number in the control room via the data logs of the work queue. Can anybody help me append this returning data to my existing collection? Would really appreciate the advice. Thanks


Hi Martin

As far as of my understanding for your explanation, is that the collection does not contain the column name ("reference-number") which you have specified for storing the read data into collection with Field Name ("reference-number").

If that is the case, we have two or three methods for doing it.

1. Add new Column name into Excel with Name "reference-number" before getting into Collection.
2. Add new column to collection after getting data from Excel to collection using "Utility - Collection manipulation", "Append Field(Text)"
Inputs for above are
Collection=main Collection after data import.
Field Name="reference-number"
Value=""
Output for above is
Appended collection with new Column name added.
After that you can add the data as you said above.
3.Creating a new defined collection with the fields required for storing the all the data (i.e. Inputs as well as Outputs).

Thank you
Hoping you understand above and might help you.
 

Martin76

New Member
Hi Martin

As far as of my understanding for your explanation, is that the collection does not contain the column name ("reference-number") which you have specified for storing the read data into collection with Field Name ("reference-number").

If that is the case, we have two methods for doing it.
after getting the data in collection for the Excel file please add a new field (Column-Text)




Hi Martin

As far as of my understanding for your explanation, is that the collection does not contain the column name ("reference-number") which you have specified for storing the read data into collection with Field Name ("reference-number").

If that is the case, we have two or three methods for doing it.

1. Add new Column name into Excel with Name "reference-number" before getting into Collection.
2. Add new column to collection after getting data from Excel to collection using "Utility - Collection manipulation", "Append Field(Text)"
Inputs for above are
Collection=main Collection after data import.
Field Name="reference-number"
Value=""
Output for above is
Appended collection with new Column name added.
After that you can add the data as you said above.
3.Creating a new defined collection with the fields required for storing the all the data (i.e. Inputs as well as Outputs).

Thank you
Hoping you understand above and might help you.

Thanks Amarender. I've finished the course some time ago but this will be very helpful for future reference!
 

ole

New Member
Hi @Martin76

I'm also in the same ordeal with BP Order System and now stuck on how to capture the Order Reference Number as the output. if you could share your workaround how to get it right?

This is what I have in the calc stage in an attempt to get the order reference number, under the Object Studio - (Exercise 11.1.9 Action – Order Confirmation) But still cant get the last digits as the outout when I view the log in the control room...

Expression:
Trim(Replace([Order Reference Sentence],"Please take note of your order reference:",))

Text:
Order Ref Number
Order Ref Sentence

Store In:
Order Reference Number

Hope you could share the exact sol.
Thanks
 

Amarender

Member
Hi @Martin76

I'm also in the same ordeal with BP Order System and now stuck on how to capture the Order Reference Number as the output. if you could share your workaround how to get it right?

This is what I have in the calc stage in an attempt to get the order reference number, under the Object Studio - (Exercise 11.1.9 Action – Order Confirmation) But still cant get the last digits as the outout when I view the log in the control room...

Expression:
Trim(Replace([Order Reference Sentence],"Please take note of your order reference:",))

Text:
Order Ref Number
Order Ref Sentence

Store In:
Order Reference Number

Hope you could share the exact sol.
Thanks


Hi Ole,

Can you please tell me what is the below one you have given in your message and tell me where are you storing the captured text "Please take note of your order reference: xxxx".

Text:
Order Ref Number
Order Ref Sentence

Thanks and Regards
Amarender
 

Amarender

Member
Hi @Amarender

I store it in Order Ref Sentence data item.

Thanks


Hi

As per your message above your are storing it in "Order Ref Sentence" and your using "Order Reference Sentence" to replace so its not working try the same data item you stored.


Trim(Replace([Order Reference"Sentence],"Please take note of your order reference:",))

Thanks and regards
Amarender
 

ole

New Member
Hi @Amarender

I tried the initial expression above but still no output. So im trying another expression
(Right([Order Reference Number], 4)

.. here's what I have under Object Studio for the "Order Confirmation" page:

Start: Inputs tab:
-Name field : Order Reference Number
-Store In field: Order Reference Number (as text)

Wait stage:
-Name: Order Confirmation Window
-Actions tab: Element: Order Confirmation Window
-Condition: check exists
-type: flag
comparison: equal
value: true
timeout: 30

Multi Calc props:
-Expression field:

Right([Order Reference Number], 4)
Store in: Order Reference Number (text)

End: Outputs tab:
Name: Order Reference Number
type: text
Get Value From: Order Reference Number

Do you think the "Right" text function would work ? still not getting the output for the last 3 digits of order number.

Thanks
 
Top