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 / Set Dataverse lookup c...
Power Automate
Suggested Answer

Set Dataverse lookup column value

(0) ShareShare
ReportReport
Posted on by 13
Hi all, 
I am pretty new to Dataverse and using lookup columns in power automate. 
 
I have a column called epolle_boardterminal on my table called Futures / Hedging. This column is a lookup to epolle_purchasecontracts. On the Purchase Contract table, there is a column called epolle_terminal which is itself a lookup to table epolle_configmonthyears (primary name column of epolle_monthyear). 
 
In my app, the user selects a lookup value on Purchase Contracts in the epolle_terminal field. 
 
What I am trying to do for the Futures / Hedging table, is simply add a new row which is the one they selected in Purchase Contracts via the epolle_boardterminal lookup column. 
 
I have tried the below but it says "Bad Request - Error in query syntax."
 
 
Any ideas what I am going wrong?
 
Thank you very much.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Lagortinez Profile Picture
    130 Moderator on at

    Hi,

    Welcome to Dataverse and Power Automate! What you're trying to do is a common scenario, and you're very close to the solution.


    ✅ How to set a lookup field correctly in Power Automate:

    When you're adding a new row to a Dataverse table and need to populate a lookup column, the value must be passed in a specific URI format:

    /{entitylogicalnameplural}({GUID})

    For your case:

    • The lookup field on Futures / Hedging is epolle_boardterminal (which looks up to epolle_purchasecontracts).

    • You should set the value using:

    concat('/epolle_purchasecontracts(', <GUID>, ')')

    If you’ve used "Get a row by ID":

    Use this expression in the "Add a new row" action:

    concat('/epolle_purchasecontracts(', outputs('Get_a_row_by_ID')?['body/epolle_purchasecontractsid'], ')')
    • Replace epolle_purchasecontractsid with the actual internal name of your Purchase Contract primary key if different.

    • Make sure you're using the plural logical name of the entity, not the display name.

    This will correctly reference the Purchase Contract in your epolle_boardterminal lookup field.


    If this post helped you, please click "Does this answer your question?" and give it a like to help others in the community find the answer too!

    José Martínez Lago
    Solution Architect | Dynamics 365 & Power Platform
    Empowering low-code consultants to deliver high-impact solutions
    Blog: thatsagoodquestion.info
    LinkedIn: martinezlago

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard