Hwach |
Member |
|
|
|
|
None Specified |
|
Friday, September 18, 2015 |
Monday, August 21, 2017 1:43:53 PM |
19 [0.11% of all post / 0.01 posts per day] |
|
Nevermind, looks like I loaded an older version of the mapping. It seems to be working now, thanks that!
|
that wrote:This should work if you insert a "first-items" function before the input to your ItemMeta function.
Okay so I tried that but I am a little unsure how the node works. It just seems to pull it in once, I will attach an image.
|
Hi,
This is probably a simple function that I am just not grasping. I have an order file that has multiple orders with single lines per product. So for example;
Code: Order ID, product, qty, personalisation 101 ,BOX1 ,1 , "nicebox!" 101 ,ITEM1 ,1 , "part of order 101" 101 ,ITEM2 ,1 , "part of order 101" 101 ,ITEM3 ,1 , "part of order 101" 102 ,BOX1 ,1 , "next order!" 102 ,ITEM1 ,1 , "part of order 101" 102 ,ITEM2 ,1 , "part of order 101" 102 ,ITEM3 ,1 , "part of order 101"
So what I want to achieve is a variable that sets itself when the group changes (order ID) and then repeats itself;
Code: Order ID, product, qty, personalisation 101 ,BOX1 ,1 , "nicebox!" 101 ,ITEM1 ,1 , "nicebox!" 101 ,ITEM2 ,1 , "nicebox!" 101 ,ITEM3 ,1 , "nicebox!" 102 ,BOX1 ,1 , "next order!" 102 ,ITEM1 ,1 , "next order!" 102 ,ITEM2 ,1 , "next order!" 102 ,ITEM3 ,1 , "next order!"
I will attach an image of what I have tried and what it is outputting. If anyone could give me a little guidance, that would be great :)
Thanks, Hwach
|
Hi Vlad,
Think I've found the issue! The if/else that puts 'F' didnt have anything on the false connector so I imagine it was trying to concat 'P' with NULL which just wouldn't work.
It looks to be generating correctly now, will let you know if I have an issue. Thanks for all the help.
|
Hi Vlad,
Could the value map be causing the issue?
|
Hi Vlad,
You seem to be getting the results I need, however, when I try I don't seem to be able to get it.
I will attach what I have done. The value map is just doing 'FLAT->F, FLUTED->F, FLAT & FLUTED->F' etc. The foil input is just the type and the compute when is the group-by's 'groups' node. I am not getting any output at all ( I am taking the output of this user function and concat'ing it with "P" to try create "PF").
|
Okay, as you can see in the file, each job number is a separate output. For each output (aka file) I need a single code next to each row which summarizes all processes on that job. As in my previous examples, the job is the container item which holds individual items. The whole foil, emboss, diecut etc each have a letter.
So, all codes start with 'P'. If something on that job has foil, it becomes 'PF' even if others on that job don't foil. If something then embosses, the code is 'PFE'. This code is on every row for that job.
Hope this helps?
|
Hi Vlad,
Okay I have stripped out all the info and renamed as much as possible. I have removed most of the functions so that it is clear which part I am working on, these functions had no effect on the field I am trying to generate the code to.
|
Hi Vlad,
Apologies, I am trying to conceal the customer as much as possible otherwise I would just post everything. Some of the data is being changed as well as this is for an ongoing project ( hence the 'stringempty' instead of the addition; we needed to change from 'yes' to 'foil', this could be mapped using a value map however ). I can change this to be exactly how it needs to be, just let me know...
How else am I making this difficult and I will try give you as much detail as possible?
|
Here is some more info.
The top screenshot shows my input into the function. The group comes from 'group-adjacent' on the container name. The value map simply says 'Guillotine->G, Diecut->D' and the foil/emboss inputs are just FOIL or null.
The final screenshot shows you my output ( 1 file per container, which is working fine, the code just differs on each line ).
|
|