cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
quentinfr
Level: Powered On

Auto fill textinput from gallery

Hi,

My users have to fill a text input with a city name and I want to help them to fill it with a gallery with suggestions in a gallery.

 

The gallery has several city name (not all) and it filter items from the text input.

 

My goal is to allow the to fill the text input with the gallery. I tried the galleryitem.onselect=

textinput.text = thisitem.cityname 

But the text from the textinput doesn't changed.

The comonbox tool is not a good solution (not all the cities are in the city table)

 

please help me 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft Employee

Re: Auto fill textinput from gallery

Please try the following:

YourGalleryControl.OnSelect=UpdateContext({val: YourGalleryControl.Selected.cityname })

testInput.Default=val

 

Please name the "Default" property of the Text input control (not Text)

 

The reason your formula did not work is because your textInput control was already bound to a value or a property so attempting to set it dynamically will not work.

 

 

3 REPLIES 3
Highlighted
Microsoft Employee

Re: Auto fill textinput from gallery

Please try the following:

YourGalleryControl.OnSelect=UpdateContext({val: YourGalleryControl.Selected.cityname })

testInput.Default=val

 

Please name the "Default" property of the Text input control (not Text)

 

The reason your formula did not work is because your textInput control was already bound to a value or a property so attempting to set it dynamically will not work.

 

 

quentinfr
Level: Powered On

Re: Auto fill textinput from gallery

Thank you @dinusc

I tried this solution previously but I don't know why it didn't worked. Thanks to you I tried again and  it works perfectly

amila1
Level: Powered On

Re: Auto fill textinput from Edit

Hi Guys 

 

Need help for me i make Canvas app via Powerapps its for visitor manegment system i need auto fill details ones i put ID Number auto fill that Old user details ,, details Geting from my shere point List 

 

Please check screen shot , 

Capture.JPG