cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amirhossein
Regular Visitor

Setting value for Lookup field

Hi,

Trying to set value for a Lookup field in NewForm. What datatype sturcture (record) is needed for Card Default property?

I tried something like: LookUp(source, ID=x), {Id:1, Value:"x"} but no success.

 

FYI, I'm joining 2 lists using ID col. of list A to Lookup col. of list B referenced to A.ID (one-one relationship); So while adding records in List B, i should set reference column manually (using a valued hidden card). Maybe i'm doing badly. Any suggestion if i am wrong about it?

 

Thanks

2 REPLIES 2
v-micsh-msft
Community Support
Community Support

Hi @amirhossein,

 

 

If you generate the App from SharePoint, then there would be edit form and display form generated automatically, and the datacard property is also set automatically.

For customize part, please take a look at the Understand data cards part.

Understand data cards

Adding some more reference.

Understand data forms in Microsoft PowerApps

Edit form and Display form controls in PowerApps

Data Cards:

Understand data cards

Card control in PowerApps

Introducing support for lookups and a new sample app

And if you need any further assistance, please post back.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-micsh-msft my datasource is SharePoint and unfortunately i couldn't create sharepoint valid LookUp record (contains @datatype,  Claims, etc) from datesource record in PowerApps. Finally i changed LookUp column type to Number and store foreign key as single value. So no success.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,242)