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

FindbyId query from PowerApps - SharepointList or Excel

Hi,

I am very new to PowerApps. Would like to know what is the best way to achieve the below requirement in PowerApps.

 

Given a CustomerId in PowerApps input field, the corresponding details of the customer (only) has to be fetched from SP List or Excel. Example : The excel or SP list has details of customers (CustId, Name, Locataion, PhoneNo, Address etc). There are 2000+ records and do not want to fetch many & apply filter at the PowerApps side in UI. Rather looking for an option to just fetch records that has the given CustId.

 

Thanks,

Prav

2 ACCEPTED SOLUTIONS

Accepted Solutions
Edwin-Abdalian
Solution Supplier
Solution Supplier

if you are planning to show the Customer details in a Form (in View mode), create a textInput as your search ID textbox outside of the form.

Then set the Item property of the Form to : 

 

LookUp('Customers List', CustomerID = Value(txtCutomerSearch.Text))

there is no delegation issue and you should get 1 record back if the ID in textInput matches with any ID in your list

--------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

View solution in original post

v-xida-msft
Community Support
Community Support

Hi @PravK ,

Do you want to retrieve corresponding customer detail info from a SP List or a Excel based on the specific CustomerId within your app?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Default property of the Name Text Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Name)

Set the Default property of the Location Text Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Location)

Set the Default property of the PhoneNoText Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, PhoneNo)

Set the Default property of the Address Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Address)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best egards,

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

View solution in original post

4 REPLIES 4
Edwin-Abdalian
Solution Supplier
Solution Supplier

if you are planning to show the Customer details in a Form (in View mode), create a textInput as your search ID textbox outside of the form.

Then set the Item property of the Form to : 

 

LookUp('Customers List', CustomerID = Value(txtCutomerSearch.Text))

there is no delegation issue and you should get 1 record back if the ID in textInput matches with any ID in your list

--------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

View solution in original post

There will definately be a delegation issue if you store them in Excel, since Excel doesn't do delegation.  But if you store them in a SharePoint list you should be fine.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
v-xida-msft
Community Support
Community Support

Hi @PravK ,

Do you want to retrieve corresponding customer detail info from a SP List or a Excel based on the specific CustomerId within your app?

 

Based on the needs that you mentioned, I think the LookUp function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Default property of the Name Text Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Name)

Set the Default property of the Location Text Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Location)

Set the Default property of the PhoneNoText Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, PhoneNo)

Set the Default property of the Address Input box to following:

LookUp('SP List', CustId = CustomerIdInputBox.Text, Address)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best egards,

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

View solution in original post

PravK
Frequent Visitor

Thankyou @Edwin-Abdalian  @v-xida-msft  @Pstork1  ! your inputs were helpful.

 

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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (60,970)