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 Apps / Custom Form that refer...
Power Apps
Answered

Custom Form that references lookup field not show as required

(0) ShareShare
ReportReport
Posted on by 30

Hi,

So I'm created a custom form using power apps that will add to a sharepoint list. One of the fields that is getting updated is a lookup field. So for a while I wasn't able to get the form to properly update the field until I found a post that said to change the value of the update field to the following: 

 

{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: DataCardValue6.Selected.ID,
Value: DataCardValue6.Selected.'Role (Title)'
}

 

With this update statement, the field now properly updates when the form is submitted BUT I've noticed that even though the field is marked as required, powerapps doesn't detect it as required. I know this b/c 1 when I hit save with none of the fields populated the other fields I've designated as required complain but the Role field does not. Also I've tried saving the Form with all the required fields filled in except the Role field and it still saves. If I remove the update statement and replaced with DataCardValue6.Selected, the field is properly detected as required. Is there a special statement I need to use for the required field? 

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    154,799 Most Valuable Professional on at

    Hi @id013 ,

    Two things here - you no longer need the "odata.type" line

    {
     Id: DataCardValue6.Selected.ID,
     Value: DataCardValue6.Selected.'Role (Title)'
    }

    The other issue is that you can set the Required on the Data Card to true and it should do what you need.

    However another workaround - I assume your Items of the Combo Box are based on the other list being looked up, so if the Items was

    RenameColumns(
     YourSPList,
     "Role (Title)",
     "Value"
    )

    and you displayed Value in your Combo Box, then the Update could be

     DataCardValue6.Selected

    Third (and best in my opinion) - throw away those lookup fields (you do not need them) and convert the field to Text - Items of your drop-down

    YourSPList.'Role (Title)'

    Update of the Data Card (to the Text field)

    DataCardValue6.Selected.'Role (Title)'

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • shalem120kjh Profile Picture
    105 on at

    g

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 Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard