Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

'Format data by examples' test successful, but fail in the production execution

(0) ShareShare
ReportReport
Posted on by 18

Dears,

I occur to a problem in using 'Format data by examples'. 

 

I would like to extract my file name, to get the category name. I got it successfully in  'Format data by examples'. 

dora_1-1671768375184.png

This is what i would like to have. 

While I put it into the 'send email'-body, I cannot get this result. I received the email like this:

dora_3-1671768478947.png

My variable setting:

dora_5-1671768581073.png

 

My send email setting:

dora_4-1671768550254.png

 

I only have 2 variables: BU and reportDate, both of them failed to display.

Can anybody help on this?

 

Thanks a lot.

 

 

  • dora Profile Picture
    18 on at
    Re: 'Format data by examples' test successful, but fail in the production execution

    Thank you Dezhi. It works now.

  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at
    Re: 'Format data by examples' test successful, but fail in the production execution

    Hi @dora ,

     

    If your filenames have a fixed format, you can try the following.

     

     

    split(split(base64ToString(triggerOutputs()?['headers/x-ms-file-name-encoded']),'--')[1],' ')[0]

     

    vdezhilimsft_0-1671777471360.png

     

    vdezhilimsft_1-1671777471361.png

     

    vdezhilimsft_2-1671777471361.png

     

     

    Best Regards,

    Dezhi

  • dora Profile Picture
    18 on at
    Re: 'Format data by examples' test successful, but fail in the production execution

    Hello Dezhi,

    I have more and more problems now. 

    1. The flow works again, but it really missed 2 new files and capture the 3rd&4th new files. Does it mean that in the normal operation, power automate will miss some of the new files?

    2. Base64toString:

    It show me the error msg:

    dora_0-1671775577703.png

    I have 2 variables, one is BU, which only has characters; another one is requestdate. Its data type is string and the value is serveral number, like 1220. 

    My slicer:

    slice(triggerOutputs()?['headers/x-ms-file-name-encoded'], 13, indexOf(triggerOutputs()?['headers/x-ms-file-name-encoded'], ' '))
     

    3. When I get the error msg and go back to edit the flow, i cannot find Base64toString in the variable, it still shows the slicer(...), i remmber that when i change it into base64, it shows base64tostring(...). 

    dora_1-1671776176159.png

     

     

  • dora Profile Picture
    18 on at
    Re: 'Format data by examples' test successful, but fail in the production execution

    Hello Dezhi,

    The trigger is the same as your screen cut. I used 'when a new file was created in sharepoint'.

    I just try the base64tostring, but i don't know why the Automate fails to capture my new file in the sharepoint and the flow cannot be triggered. 

    This has also happened in this morning, and it can capture the next new file updated. 

  • v-dezhili-msft Profile Picture
    Microsoft Employee on at
    Re: 'Format data by examples' test successful, but fail in the production execution

    Hi @dora  ,

     

    Could you please show the trigger you used?
    You could try base64ToSring() to convert the output.

    vdezhilimsft_0-1671773640853.png

     

    Best Regards,

    Dezhi

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,991 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow