IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: Hwach
About
User Name: Hwach
Forum Rank: Member
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Friday, September 18, 2015
Last Visit: Monday, August 21, 2017 1:43:53 PM
Number of Posts: 19
[0.11% of all post / 0.01 posts per day]
Avatar
Last 10 Posts
Topic: Repeat value for all rows in a group
Posted: Monday, August 21, 2017 1:43:53 PM
Nevermind, looks like I loaded an older version of the mapping. It seems to be working now, thanks that!

Topic: Repeat value for all rows in a group
Posted: Monday, August 21, 2017 1:35:25 PM
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.
Topic: Repeat value for all rows in a group
Posted: Friday, August 18, 2017 3:45:10 PM
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
Topic: Sum of a function by group
Posted: Thursday, October 8, 2015 8:16:13 AM
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.

Topic: Sum of a function by group
Posted: Wednesday, October 7, 2015 7:55:17 AM
Hi Vlad,

Could the value map be causing the issue?
Topic: Sum of a function by group
Posted: Monday, October 5, 2015 10:29:17 AM
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").
Topic: Sum of a function by group
Posted: Friday, October 2, 2015 11:10:28 AM
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?
Topic: Sum of a function by group
Posted: Friday, October 2, 2015 8:53:29 AM
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.


Topic: Sum of a function by group
Posted: Thursday, October 1, 2015 10:51:27 AM
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?
Topic: Sum of a function by group
Posted: Thursday, October 1, 2015 8:55:16 AM
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 ).

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.