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

Setting default text datacard in form from another data source

Hey all.

 

I am trying to set a default value for a text datacard that's from another data source. For example. The form where the datacard lives submits to Timekeeping datasource/list. However, I want to pull the user's "Department" from another data source called Employees. I have added both data sources. Any help would be greatly appreciated. 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Got it. Thanks again so much for the help and sending me in the right direction. For anyone that might come across this the formula in the From1 Datacard TextInput - Default=

 

LookUp('List2', 'employee'.email = User().Email).Department.Value

 

Thanks again @RandyHayes 

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

@Dhubach1 

Are you planning to not let the user make changes to that value in the form?  i.e. you just want it to always have the looked up value?

 

If so, then just set the Update property of your Datacard to a lookup.

Ex:  LookUp(<yourOtherListHere>, <yourLookupCriteriaHere>, <yourLookedUpColumnHere>)

 

If you want to allow them to edit it, then you should apply the above to the control in the datacard that contains the value.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks for the response and looking into this now. The only problem is there are multiple departments that I am trying to look up from the other column.

 

I have a form1 that submits work-from-home requests to spo list1. I want to be able to pull the employee's "department" column from spo list 2 and fill it in the datacard 'Department' for form1 automatically if possible.

 

Hope this makes sense thanks again

I am trying LookUp('List2', department = User()?)   Sorry im a noob <--- User would be the logged in user to the system/App. 

 

Thanks!!

List 2 has two columns that i need to match with the signed in user. Emplyees(peoplepicker) and Directorate (choice). @RandyHayes 

 

Thanks much

Got it. Thanks again so much for the help and sending me in the right direction. For anyone that might come across this the formula in the From1 Datacard TextInput - Default=

 

LookUp('List2', 'employee'.email = User().Email).Department.Value

 

Thanks again @RandyHayes 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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