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

Can a field within a form be connected to a different data source to auto populate

Hello,

  I have a form that is connected to a Sharepoint List for an approval process.  This list is used to capture the inputs from our sales folks.  Within the form, I have a field Cust_ID.  When a rep inputs the Cust_ID, I'd really like the Cust_Name field to populate the name of the Customer.  My Customer Master list is in a different data source. I have this in an excel table and a sharepoint list.  for the life of me cannot figure this out.  any help would be greatly appreciated

 

denbmoore_0-1605722366962.png

 

  Thank you so much

10 REPLIES 10
gabibalaban
Dual Super User
Dual Super User

Hi @denbmoore ,

 

Is your data kept in 2 places an excel file and a sharepoint list ? Or do you have same data in them ?

 

Use on Default property of the textinput  under customer_name the following:

LookUp(My_Customer_Master_data_source,ID=Cust_ID).CustomerNameColumn

For that you need to be sure that all users of your app have at least read access to My_Customer_Master_data_source

@gabibalaban 

Thank you, I'll try it out.  I have the customer master in both types, excel and sharepoint.  I didnt know if there were advantages in either so I have them duplicated.  I'll try it out.  THank you so much

denbmoore
Frequent Visitor

@gabibalaban.  The excel file that i want to lookup the Customer name is DenCustomerMaster.  the form is connected to a Sharepoint list.  I have both as connectors.  I tried the following formula and I have some arguments.  Again, I apologize if this is a dumb question but I appreciate your help.

LookUp('ExcelOnline(Business)'.GetItem(ThisItem.'Customer Name',.......   it asks for the file, which is not shown, then table,id,source,idColumn).  Any advise how to to pull from the excel file?  

@denbmoore 

Well ..the easiest way is to put the excel file in OneDrive for Business. Please take care that your data in Excel has to be structured as defined table.

The file is in OneDrive and the data is in a table.  I'm not sure how to fetch the data in the file with the parameters of the lookup function.  

@gabibalaban 

  my bad, Onedrive is disabled from our administrators, we kind of have it due to MSFT teams and Sharepoint.  I went ahead and used your formula with my Sharepoint List. (Cust_Master)  It is close.  It is referencing the columns within the sharepoint list but how can I tie it to the customer number field in the form?  also, receiving this error

 

denbmoore_0-1605729503425.png

 

 

LookUp(Cust_Master,ID=CUSTOMER_ID).CUSTOMER_NAME

It seems that one of your value is text and the other one is numeric inside the lookup function (the small blue line tell me this).

So let's try using this (it might give you a delegation warning):

LookUp(Cust_Master,ID=Value(CUSTOMER_ID)).CUSTOMER_NAME

@gabibalaban 

 

It did give me a delegation error.  Should I try changing the Customer number field to "text"?

They are all set to text values in fields

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,067)