Skip to main content
Question

Connect lines without common ID by order in file

  • March 1, 2018
  • 2 replies
  • 18 views

Hi

I have a csv file with lines that relate to each other purely by the order they appear in the file. So all the records with a record type "1" are the main record and the lines below with 2, 3, 4 or 5 record types relate the record above with the type 1. There could be any number of lines below and you only know when you get to a new record because you get a new record type 1. I would like to assign a new field with a common ID to the lines that refer to the same property. So in the first example the 8 lines would have a common ID and then the next 3 lines a different ID.

1 106 London road

2 Ground

2 Ground

2 First

1 104 London Road

2 Stores

3 Offices

1 Retail

4 Car Parking

Any help gratefully received.

Thanks

Ruth

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

  • Author
  • 1 reply
  • March 1, 2018
Sorry my example didn't follow what I said. I posted an image but this disappeared. Basically I want to connect the first 4 lines together. The next 3 and the finally 2. Thanks!

 

 

 

 


jdh
Contributor
Forum|alt.badge.img+37
  • Contributor
  • 2002 replies
  • March 1, 2018

You can use the adjacent features to assign an id, that increments when you get to a record 1.

 

 

textlinebreaks.fmw