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

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.