Textdata

Hi friends,

I have 2 text files. I need to read both the files.
And compare the date from 1st text file with the 2nd text file.

If I find and difference I need to write remark in the 2nd text file.

My test file looks like this 1st test file

MT -500
Date-231211
Benefit- ABC
Currency-Rs

My 2nd text file
MT -500
Date-230507
Benefit- Xyz
Currency-usd

  1. I need to check MT if it is same them I need to go to next step else I need to stop.

  2. I need to Date and if it is different I need to write how many days difference is there.

  3. Need to check Benefit and write the remarks

  4. Need to check if currency is same or not and write the remark

So how to go with this. Please help me

@hanviprebday
where you need to write the remarks!!

Need to write the remarks like this

MT -500
Date-230507. Remarks Difference of days-89
Benefit- Xyz. Remarks Benefits are different
Currency-usd remarks currency is not matching

I should write like this

Hi @hanviprebday

Please check the attached solution. It’s a snippet you can modify the Remarks according to your field and comments required.

Let me know if it helps. Cheers

TEST.zip (3.5 KB)

Hi @hanviprebday

  • Read Text File (path to 1st text file) → Output to textFile1

  • Read Text File (path to 2nd text file) → Output to textFile2

  • Assign (Extract details using Regex from textFile1)

  • Assign (Extract details using Regex from textFile2)

  • If activity (Check if MT is the same)

    • Then (Continue with the next checks)
    • Else (Stop the process)
  • If activity (Compare Dates)

    • Then (Calculate the difference and prepare remark about Date)
    • Else (No action needed)
  • If activity (Compare Benefits)

    • Then (Prepare remark about Benefit)
    • Else (No action needed)
  • If activity (Compare Currency)

    • Then (Prepare remark about Currency)
    • Else (No action needed)
  • Write Text File (path to 2nd text file, append the remarks)