Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
  • 1.  Lookup Fields in PowerAutomate

    Posted Aug 26, 2021 12:11 PM
    Hi,

    I need help with lookup fields in PowerAutomate and D365 CE.  I have a flow that creates new records, but the lookup fields are failing when the parent record does not contain a value.  If the parent record contains values the flow works perfectly and does not fail.  Any advise on how to fix this issue?

    Below is an example of the fields and format in flow, which work when values are present.







    ------------------------------
    Monica Cruz
    Sr Solution Consultant
    ------------------------------


  • 2.  RE: Lookup Fields in PowerAutomate
    Best Answer

    Silver Contributor
    Posted Aug 27, 2021 05:41 AM
    You need to use an expression to get around blank lookups. Basically, tell flow that if the lookup is empty, to enter ' '.

    if(empty(triggerOutputs()?['body/_parentcustomerid_value']), ' ',concat('accounts(', triggerOutputs()?['body/_parentcustomerid_value'],')'))

    You don't need to type 'triggerOutputs()?['body/_parentcustomerid_value']' - just select the field from the Dynamic Content tab.

    ------------------------------
    Donal McCarthy
    Digital Marketing Administrator
    BrightWork
    Galway
    ------------------------------



  • 3.  RE: Lookup Fields in PowerAutomate

    Posted Aug 27, 2021 12:34 PM

    Hi Donal,

    This worked perfectly, thank you so much.

    Best Regards,

    Monica



    ------------------------------
    Monica Cruz
    Sr Solution Consultant
    ------------------------------