cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
daniel72
Frequent Visitor

Pass data to lookup column datacard in powerapp form

Hi all,

i am trying to modify a sharepoint list (Employees) edit form with powerapp. The list has a lookup field to another list called Departments. On the new powerapp form i  added a second screen with a DataTable connected to  list “Departments”. My goal is to select the department on Screen2 from the Datatable1 and pass it to the lookup column Datacard to Screen1 (FormScreen1). The expression Lookup(Departments; ID = DataTable1.Selected.ID) at the Update section from DataCard does not throw an error but it is not working when the form  is saved.

 

Screenshot 2021-01-19 174348.jpg

How can i pass the selected values to the lookup columns field correct?

 

TIA

Daniel

2 REPLIES 2
WarrenBelz
Super User III
Super User III

Hi @daniel72 ,

The error you can see is a Delegation warning as the Lookup to another table is not Delegable. If Departments have less than 2,000 items, you could try this

With(
   {wDept:Departments},
   {
      Value:DataTable1.Selected.Value,
      Id:
      LookUp(
         wDept,
         Department=DataTable1.Selected.Department
      ).ID
   }
)

NOTE - I am assuming field names here - you may need to correct these. I am also assuming your reference tothe data table is correct.

 

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.

 

 

WarrenBelz
Super User III
Super User III

Hi @daniel72 ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (25,510)