Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Re: insert row in excel file if it does not exist

(0) ShareShare
ReportReport
Posted on by 13

Tried it but i can't seem to get the condition syntax right

Here is a screenshot

 

flow1.png

  • Mike29f Profile Picture
    19 on at
    Re: insert row in excel file if it does not exist

    That's fine but what to do when I can't paste custom value?

  • rusgesig Profile Picture
    6 on at
    Re: insert row in excel file if it does not exist

    So how do we do this now that you can't have custom conditions?

  • Community Power Platform Member Profile Picture
    on at
    Re: insert row in excel file if it does not exist

    Thanks this helped me solve my issue!

  • Mike_Guzowski Profile Picture
    219 on at
    Re: insert row in excel file if it does not exist

    If there is nothing much happening after a conditional split please consider using error handling capability of Microsoft Flow along with Termination action with "Succeeded" status.

    Example ("update a row" may be also "get row"):

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: insert row in excel file if it does not exist

    Hi @majdi_d,

     

    Could you please show a bit more about your Excel table?

    Faurther, do you create a record in Opportunities object of Salesforce?

     

    I think there is something wrong with the formula that you provided within Condition box. The formula that you provided is only supported in PowerApps ranther than Microsoft Flow. More details about expression supported in Microsoft Flow, please check the following article:

    WDL expression in Microsoft Flow

     

    In addition, I think you have a misunderstanding in usage of the "Get row" action of Excel connector. The "Get row" action of Excel connector is used to retrieve a single row from an Excel table, the Row id field of this action is required to fill a Unique identifier of a row in your Excel table ranther than the unique identifier of a record in your Salesforce object.

     

    I assume that you created a record in Opportunity object of Salesforce, I have created a Excel table on my side and the data structure of it as below:6.JPG

    Note: The Opportunity ID column is used to store the unique identifier of a record in Opportunity Object. 

     

    I have made a test on my side and please take a try with the following workaround:

    • Add a "When a record is created" trigger, specify Object type.
    • Add a "Get rows" action, specify File Name and Table Name.
    • Add a "Filter array" action, From set to output of "Get rows" action, Within Condition box, left input box set to Opportunity ID dynamic content (Decorated as Opportunity_x0020_ID within Dynamic Content tab) of "Get rows" action, right input box set to Opportunity ID dynamic content of the trigger. Within middle drop down, choose is equal to.

    Note: If you want to check if there is a record with same Opportunity Name (or other properties) has been existed in your Excel table, within above Condition box, left input box set to Opportunity Name (or other properties) dynamic content.

     

    • Add a Condition, click "Edit in advanced mode", type the following formula:
    @empty(body('Filter_array'))
    • Within "If/yes" branch of Condition, add a "Insert row" action.

    Image reference:7.JPG

     

    8.JPG

    The flow works successfully as below:9.JPG

     

    10.JPG

     

     

    More details about using expression in flow actions, please check the following article:

    Using Expression in flow actions

     

     

    Best regards,

    Kris

     

  • CarlosFigueira Profile Picture
    on at
    Re: insert row in excel file if it does not exist

    Ah, this is a PowerApps community board, you're using Microsoft Flow. I'll move this thread to the appropriate board, and someone there should be able to answer it.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >