Solved

List to Table


Badge +9

I have a list of features like the following

A

B

C

D

E

F

G

H

 

But want to get it in a table like

A B C D

E F G H

The values of A and E are a known format so want to be able to find A and add B C and D to the table row and do the same for E, adding F G and H and so on.

I have tried the following using LIstBuilder, List Exploder, Tester and Attribute Manager but can't figure out how to get the results into the attribute manager.

 

icon

Best answer by nielsgerrits 7 June 2019, 08:39

View original

5 replies

Userlevel 6
Badge +32

I find it hard to understand what you want. Can you provide a sample file of real input data and a sample file of result as you would like to see it?

Badge +9

I find it hard to understand what you want. Can you provide a sample file of real input data and a sample file of result as you would like to see it?

Thanks @nielsgerrits,

 

Here is what the input data looks like as separate features that are read in. I can test for PM FD and use the location in the list to get attributes associated with the PM.

 

This is what is looks like on the CAD drawing as separate features on a specific cad layer.

What I am trying to get as an output is where only the records with PM are output.

CNR,BEARING,FROM,DIST,PM

1,85 10,PM FD,0.93,622812067

3,270 54,PM FD,70.80,622826530

4,300 58,PM FD,0.61,66281119

 

Let me know if that makes a little more sense :)

Userlevel 6
Badge +32

If the pattern is 1,2,3,4,1,2,3,4,etc... You can use an AttributeCreator to generate SubRowNumbers and GroupNumbers like you would in Excel.

What you are looking for is "Adjacent Feature Attributes". This way you can use conditionals based on previous rows. For me this funtionality made it possible to do all the things I needed to do in Excel previously.

As the conditionals are sometimes difficult to get to, I prefer to create them in Excel and when it works how I like it duplicate the rules in FME.

listtotable.fmwt

Userlevel 6
Badge +32

Thanks @nielsgerrits,

 

Here is what the input data looks like as separate features that are read in. I can test for PM FD and use the location in the list to get attributes associated with the PM.

 

This is what is looks like on the CAD drawing as separate features on a specific cad layer.

What I am trying to get as an output is where only the records with PM are output.

CNR,BEARING,FROM,DIST,PM

1,85 10,PM FD,0.93,622812067

3,270 54,PM FD,70.80,622826530

4,300 58,PM FD,0.61,66281119

 

Let me know if that makes a little more sense :)

Thanks for clarifying @deanhowell2009. It is good practice to attach a sample input file to the question, this way we don't have to recreate testdata from printscreens. :-)
Badge +9

If the pattern is 1,2,3,4,1,2,3,4,etc... You can use an AttributeCreator to generate SubRowNumbers and GroupNumbers like you would in Excel.

What you are looking for is "Adjacent Feature Attributes". This way you can use conditionals based on previous rows. For me this funtionality made it possible to do all the things I needed to do in Excel previously.

As the conditionals are sometimes difficult to get to, I prefer to create them in Excel and when it works how I like it duplicate the rules in FME.

listtotable.fmwt

Thanks @nielsgerrits I am sure I can use this to get the result I need. Very much appreciated.

Reply