Reply
Highlighted
Level: Powered On
Posts: 2
Registered: ‎09-14-2017
Accepted Solution

navigate to the screen which screen contain the number in the Text Input

Hello everyone,

 

i have been learned Powerapp for a few weeks ago, someone could help me.

 

at the begin, i created an app by Sharepoint list, the Sharepoint list have many column such as, 'name', 'id', 'date and time', 'position'... . My layout is Title, Subtitle and Body, and then i have BrowseScreen1, DetailScreen1, EditScreen1.

 

then i created a new screen (Screen1), in the Screen1 have one Button and one TextInput at the Screen1

My desire is when i type a Number into the Textinput then i click on the Button, i want the Screen1 will navigate to the EditScreen1, the EditScreen1 is the screen have the 'id'=Number which i was typed, and the EditScreen1 have 'id','name','date and time' are the same in the Sharepoint list column.

 

Thanks and Best Regards!

Thinh Nguyen

 

 

 


Accepted Solutions
Community Support Team
Posts: 3,340
Registered: ‎06-22-2016

Re: navigate to the screen which screen contain the number in the Text Input

Hi thinhnguyen123,

 

Please try if this will work for you.


On Screen1, add a Text input control, and a Button, set the Button’s OnSelect property as: Set(id,TextInput1.Text);Navigate(EditScreen1,ScreenTransition.Fade)


On the EditScreen, select the ID data card, go to Advanced options, unlock the card. Then click the ID label, set its Text property as: id.


For other fields, you may consider to use Lookup function to find the corresponding information to the ID.


In my case, I use the Lookup function to find the Title field.


Select the Title data card, unlock the card. Then select the label for Title, set its Default property as: LookUp(List2,ID=id,Title)


You could configure the Lookup function with the same steps for other fields.

3.PNG

Reference information:
https://powerapps.microsoft.com/en-us/tutorials/function-set/
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

 

Please try it on your side and let me know if it will work for you.

 

Best regards,
Mabel Mao

View solution in original post


All Replies
Community Support Team
Posts: 3,340
Registered: ‎06-22-2016

Re: navigate to the screen which screen contain the number in the Text Input

Hi thinhnguyen123,

 

Please try if this will work for you.


On Screen1, add a Text input control, and a Button, set the Button’s OnSelect property as: Set(id,TextInput1.Text);Navigate(EditScreen1,ScreenTransition.Fade)


On the EditScreen, select the ID data card, go to Advanced options, unlock the card. Then click the ID label, set its Text property as: id.


For other fields, you may consider to use Lookup function to find the corresponding information to the ID.


In my case, I use the Lookup function to find the Title field.


Select the Title data card, unlock the card. Then select the label for Title, set its Default property as: LookUp(List2,ID=id,Title)


You could configure the Lookup function with the same steps for other fields.

3.PNG

Reference information:
https://powerapps.microsoft.com/en-us/tutorials/function-set/
https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/

 

Please try it on your side and let me know if it will work for you.

 

Best regards,
Mabel Mao

Level: Powered On
Posts: 2
Registered: ‎09-14-2017

Re: navigate to the screen which screen contain the number in the Text Input

I would like to say thanks you Smiley Very Happy, your solution is help me to know more about powerapps

 

I have a problem is when i input 'id' and then click on Button, it is navigate to the DetailScreen1

, the 'ID' field is correct, but the other fields is incorrect, i need when i navigate to the Detail Screen1

, it is all of the field is correct like the column of my Sharepoint List.save.PNG

 

save2.PNGI have been used the LookUp(List2,ID=id,Title), but it is still doesn't match all of the column in my Sharepoint list. 

 

I need when i click on the Button, it navigate to the page have id, gender, department,Full of name is correct and it is the same like my column on my Sharepoint List.

 

 

save3.PNG

 

 Thanks and Best Regards

 

Thinh Nguyen

Community Administrator
Posts: 724
Registered: ‎05-04-2016

Re: navigate to the screen which screen contain the number in the Text Input

You need to uncouple the edit / display forms in your application from the gallery selection to make that work - the post at https://blogs.msdn.microsoft.com/carlosfigueira/2017/10/04/decouplingbrowsegalleryfromforms/ has instructions on how to do that.

 

Once the form doesn't depend on the gallery selection anymore, you can perform a lookup in your data source based on your id, and if the lookup is successful, pass that item to the edit screen directly. So if you followed the instructions in the blog post, you can have your button's OnSelect property set to:

UpdateContext({item: LookUp(SharepointListName, id=TextInput1.Text)});
If(!IsBlank(item), Navigate(EditScreen1, ScreenTransition.None, {editItem: item})