Skip to main content
Solved

List to Table


deanhowell
Influencer
Forum|alt.badge.img+23

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.

 

Best answer by nielsgerrits

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

View original
Did this help you find an answer to your question?

5 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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?


deanhowell
Influencer
Forum|alt.badge.img+23
  • Author
  • Influencer
  • June 7, 2019
nielsgerrits wrote:

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 :)


nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • June 7, 2019

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


nielsgerrits
VIP
Forum|alt.badge.img+54
deanhowell wrote:

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. :-)

deanhowell
Influencer
Forum|alt.badge.img+23
  • Author
  • Influencer
  • June 10, 2019
nielsgerrits wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings