web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Form that refer...
Power Apps
Unanswered

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
    153,026 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
    94 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard