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

Put objects in variables

I was thinking about ways to variableize objects (such as datasource and screen).
Writing after connecting IF statements will be long.
So I decided to use the following method.

 

First,Place input text.
Let's name it textinput1.


Next, Place button1 with the claercollect function, I create a collection with choices and object variables.
sample:
ClearCollect(aaa,{selectID:1,transition_screen:Screen1},{selectID:2,transition_screen:Screen2},{selectID:3,transition_screen:screen3})

  When writing this sentence please check that screen(number) is recognized by powerapps (color change).


Finally, Place button2 and I select object from the collection by lookup function and read object variable.

sample:Navigate(LookUp(aaa,selectID=Value(TextInput1.Text),transition_screen),ScreenTransition.None)

 

I think that this sentence is also long.
Please tell me about the idea above, if you have a better idea.

Since I can not write English, I write it in WEB translation.
I am sorry if it is hard to understand.

1 REPLY 1
Community Support Team
Community Support Team

Re: Put objects in variables

Hi,

 

Just tested with the example you provided in your post. Both formulas could work as expected. And I cannot think of a better and shorter way to achieve your requirement. Only that in the first one, your could use the {selectedID:1,screen:Screen1} instead of  {selectedID:1,transition_screen:Screen1}.

 

Regards,

Mona

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (7,295)