cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevinsray
Helper III
Helper III

Set TextInpue Value from Collection

Hi,

Would really appreciate some help with a little process I am working on.

I have a NewVisitorsScreen where visitor enters details, name and phone number, then on click a button to Patch data to SQL table.

I am trying to put a process in where, if the user types in a phone number in the NewVisitorsScreen which already exists in the SQL table, it redirects to the ReturningVisitorScreen and populates a TextInput box which is setup as a search field.


I have a button in the NewV screen with a lookup to check if the phone number exists in SQL and enable the button if it does.

Then the onselect of the button creates the collection with the phone number, and navigates to the ReturningVisitorScreen

I can get the data I want from the NewVisitorsScreen into a collection, but not sure how to put that collection data into the search field on the Returning screen.


Any suggestions would be greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi kevinsray 

You could try the following:

 

Set the Default value of your search field to:

First(Collection).Phonenumber

 

This works if the collection only includes one row with the phone number, or if the phone number in the first row is the correct one.

 

If the collection includes multiple rows then you may need to filter it before you return the value.. Perhaps something like this, filter it so that the first phone number becomes the correct one:

 

First(
Filter(Collection, filtercondition1, filtercondition2)
       ).Phonenumber

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi kevinsray 

You could try the following:

 

Set the Default value of your search field to:

First(Collection).Phonenumber

 

This works if the collection only includes one row with the phone number, or if the phone number in the first row is the correct one.

 

If the collection includes multiple rows then you may need to filter it before you return the value.. Perhaps something like this, filter it so that the first phone number becomes the correct one:

 

First(
Filter(Collection, filtercondition1, filtercondition2)
       ).Phonenumber

 

View solution in original post

DanielaH,

You are amazing.
Exactly what I wanted. Only took me a couple of days of searching to get the nerve up to post and kaboom, perfect answer straight away. Thank you so much.

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,381)