Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Patching User Lookup on CDM

(0) ShareShare
ReportReport
Posted on by 26

I have an custom entity with a field that lookups to systemuser called Reviewer. I am able to patch other lookup fields on that entity but for some reason I receive an error when I add to update the lookup field to systemuser. See below:

 

Annotation 2019-09-20 091612.png

 

It seems like it wants to update the user record and is throwing an error because I am not including the required field('Access Mode'), but I do not want to update the user record just the lookup value. I find it strange that it works for the other lookups in this same command but get an error on this one.

 

Categories:
  • JohnBrown Profile Picture
    26 on at
    Re: Patching User Lookup on CDM

    @v-xida-msft

    This is in a canvas app and the Reviewer column is a lookup to the users entity. The combobox had
    Items: [@Users]
    I am not sure why it did not work but when I changed it to be Choices([@Custom_Entity].Reviewer) it resolved the error. Thank you!

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: Patching User Lookup on CDM

    Hi @JohnBrown ,

    Could you please share a bit more about the Reviewer column? Is it a LookUp column which references values from the Users Entity?

    Could you please share a bit more about the ComboBox_Reviewer? Which formula do you put within the Items property of the ComboBox_Reviewer?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:3.JPG

    Set the Items property of the ExternalUser ComboBox to following:

    Choices([@TaskLists].ExternalUser)

    Set the OnSelect property of the "Submit" button to following:

    Patch(
    TaskLists,
    Defaults(TaskLists),
    {
    'Primary Name': "PowerApps & Python",
    ExternalUser: DataCardValue7.Selected
    }
    )

    On your side, please make sure the Items property of the ComboBox_Reviewer to following:

    Choices([@YourEntity].ReviewerColumn) /* <-- ReviewerColumn represents the LookUp column in your Entity */

    Then modify your Patch formula as below:

    Patch(
    YourEntity,
    Defaults(YourEntity),
    {
    ...,
    ReviewerColumn: ComboBox_Reviewer.Selected,
    ...
    }
    )

    According to the error message that you mentioned, it seems to tell that there is something wrong with the value you provided for the "Access Mode" column (Option Set type column). Please check if you have provided a proper Option Set value for the "Access Mode" in your Patch formula.

    More details about setting a value for a Option Set column, please check the following blog:

    https://powerapps.microsoft.com/en-us/blog/option-sets-and-many-to-many-relationships-for-canvas-apps/

     

    Please also check and see if the response within the following thread would help in your scenario:

    https://powerusers.microsoft.com/t5/General-Discussion/Lookup-and-Load-a-user-record-from-CDS-into-powerApps-Form/m-p/365677

     

    Best regards,

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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics