web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / FIND THE LINE IN TEXT ...
Power Automate
Answered

FIND THE LINE IN TEXT FILE

(0) ShareShare
ReportReport
Posted on by

Dear Experts,

 

I have a text file uploaded in sharepoint which have hundreds of multiple line.

 

I would like to find only the line that have "{DOWNLINK_INIT {{} dn" and patch it to one of the column named "Choosen". Am I able to do so?

 

2022-11-28 16:27:47  AAA BBBBBBB {ERT_INIT {{} dn PLD61789 99 9 * last M A}}

2022-11-29 19:27:47  CNA RYRUBBB {DOWNLINK_INIT {{} dn PLD61788 88 4 * last M}}

2022-11-29 19:27:47  CNA RYRUBBB {ERT_INIT {{} dn PLD61789 88 4 * last M 88 A}}

2022-11-29 19:27:47  CNA RYRUBBB {DOWNLINK_INIT {{} dn PLD61789 88 4 * last M }}

 

Thanks

Categories:
I have the same question (0)
  • srduval Profile Picture
    1,760 Moderator on at

    You can probably do a get file contents, then a split on line break then filter the resulting array. so:

     

    1. Get file contents

    2. a compose action with a return/line break

    3. a compose action with with expression split({filecontents},{output from step 2})

    4. filter array where the body is the output of step 3 and the filter value is current item contains {DOWNLINK_INIT {{} dn

     

  • PRABA7385 Profile Picture
    on at

    Dear @srduval ,

     

    Thanks. would you please guide me on this? quite unsure on the step 2 & 3

     

    PRABA7385_0-1675242333626.png

     

    Thanks

     

  • srduval Profile Picture
    1,760 Moderator on at

    After your initialize variable add a compose action. for the value just hit "enter/return" This will create the line break. Then add another compose action below that. this time the value is the expression: 

    split(variables('A'),outputs('Compose'))
     
    By doing the split on the file contents, you are turning your blob of text into a "Table" or an array that can then be analyzed line by line.  
  • PRABA7385 Profile Picture
    on at

    Dear @srduval ,

     

    Appreciate if you could guide , having error for array:

     

    PRABA7385_1-1675302666674.png

     

    this is my coding

     

     

    PRABA7385_0-1675302579684.png

     

  • srduval Profile Picture
    1,760 Moderator on at

    Variable A needs to be string/text not array

  • PRABA7385 Profile Picture
    on at

    Dear @srduval ,

     

    I managed to make flow success, but the result not as expected: In filter array, I just need to have the whole line that have " {DOWNLINK_INIT {{} "

    PRABA7385_0-1675434141392.pngPRABA7385_1-1675434168855.png

    PRABA7385_2-1675434185338.png

     

     

  • srduval Profile Picture
    1,760 Moderator on at

    What criteria do you have in the filter array?

  • PRABA7385 Profile Picture
    on at

    Dear @srduval ,

     

    Please find attached. Much appreciate your help. Thanks

     

    PRABA7385_0-1675508054577.png

     

     

    Thanks

  • Verified answer
    VictorIvanidze Profile Picture
    13,079 on at

    Before contains place item() instead of output.

  • PRABA7385 Profile Picture
    on at

    Dear @srduval ,

     

    Would you please help how to capture below word only? used trim but not working. Thanks

    PRABA7385_1-1675675653346.png

     

    PRABA7385_0-1675675621606.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard