Jump to content

Splitting on ASCI line breaks then comparing records to identify updated records


stubarny1

Recommended Posts

Hello everyone,

 

I have a webpage that needs to accept the old version of a list of records, the new version of a list of records and then output a list of records that are new or have been updated.

 

The webpage has 2 text cells.

 

The 1st text cell for the old set of records to be added.

 

Example input:

 

Company1 title

Company 1 details

 

Company 2 title

Company 2 details

 

Company3 title

Company3 details

 

The 2nd text cell has a text cell for the new set of records to be added.

 

Example input:

 

Company1 title

Company 1 details (updated)

 

Company 2 title

Company 2 details

 

Company3 title

Company3 details

 

Company4 title

Company4 details

 

On submission of the form the following output should be given (i.e. the updated record and the new record):

 

Company1 title

Company 1 details (updated)

 

Company4 title

Company4 details

 

I’ve become stuck because I can’t split the form variables at ASCI line breaks into arrays. Please could someone point me in the right direction?

 

(Google doesn’t appear to have anything so I’m wondering whether it’s even possible to split by ASCI line break?)

 

Many thanks!

 

Stu

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.