cancel
Showing results for 
Search instead for 
Did you mean: 

Collection Manipulation

girabor
Level 4

I have a collection that contains menuitems and prices in one field(column), 

 

For example: Value - "Rice N3000" 

I want to seperate the rice into a field menuitem and N3000 into prices and store them in a different collection.

1 BEST ANSWER

Helpful Answers

1. I have used a defined collection (Items)

And added initial values to it:

Chakkravarthi_PR_0-1747035090631.png

2. Create another defined collection with the fields :

Chakkravarthi_PR_1-1747035090633.png

3. Then using Action Collection - Add Row to the Output Collection:

Chakkravarthi_PR_2-1747035090633.png

4. Loop through the collection and use the Multi Calc stage and store the result in Output Collection:Chakkravarthi_PR_3-1747035090634.png

Trim(Left(Trim([Items.Menu]), InStr([Items.Menu], " ")-1)) = Output. Item

Mid([Items.Menu], InStr([Items.Menu], " ") + 1, Len([Items.Menu]) - InStr([Items.Menu], " ")) - Output. Number

 

5. Output looks like this after iterations:

Chakkravarthi_PR_4-1747035090635.png

6. Then Use the Output collection for further processing 

View answer in original post

2 REPLIES 2

1. I have used a defined collection (Items)

And added initial values to it:

Chakkravarthi_PR_0-1747035090631.png

2. Create another defined collection with the fields :

Chakkravarthi_PR_1-1747035090633.png

3. Then using Action Collection - Add Row to the Output Collection:

Chakkravarthi_PR_2-1747035090633.png

4. Loop through the collection and use the Multi Calc stage and store the result in Output Collection:Chakkravarthi_PR_3-1747035090634.png

Trim(Left(Trim([Items.Menu]), InStr([Items.Menu], " ")-1)) = Output. Item

Mid([Items.Menu], InStr([Items.Menu], " ") + 1, Len([Items.Menu]) - InStr([Items.Menu], " ")) - Output. Number

 

5. Output looks like this after iterations:

Chakkravarthi_PR_4-1747035090635.png

6. Then Use the Output collection for further processing 

Thank you for your help.