cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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