cancel
Showing results for 
Search instead for 
Did you mean: 

Reference an Object by name string

It would be very helpful to be able to reference objects by a text name.

This is similar to this idea posted by the great anonymous - This posting is about referring to columns by text name.

But, in this case I am referring to other areas such as screen names.  

Having the ability to Navigate("screenName", ...  would be very helpful.

 

I'm not suggesting people hard code things...just the opposite - continue reading.

 

For those not getting it and considering a vote on this but not quite sure...consider this scenario.

For maintainability of an App, often you will have actions that you want to turn on and off.  Editing and re-publishing is not for the average user.  However, having a simple list (say SharePoint) that has App Actions listed in it with the corresponding Screen Name and am Enable/Disable type logic, you can write your App to turn on and off actions in your app.  

That's all good until you need to navigate to one of those screens.  Since your ScreenName is in the list, it's just text.  In order to navigate properly, you have to put a nasty Switch statement in with all the possible options.  NOT the best solution for maintainability and repeatability.

Instead of a nasty long switch statement that still needs maintenance - now I can maintain app functionality in SharePoint list and simply have a statement like Navigate(ThisItem.ScreenName, ...

 

SO...now that you see the value in this, click vote!

Status: New
Comments
Mach_GO_GO_GO
Frequent Visitor

Agreed. I had to abandon plans for a project for lack of this feature. 

ianmckay
Regular Visitor

I'm surprised this feature does not already exist.  It does so in other RAD tools such as MS Access. The benefits are considerable.  The feature makes it much easier to reconfigure and retest as your design evolves and when the customer springs late changes on you.

BenMunk
Helper I

+1 for my project right now.

Scenario:  I have a main form that collects info.  There is a button that says "Attach Appendix".  The Appendix could be one of 40 forms depending on a drop down in the main form.

The Main form and the Appendix can have multiple states.  User can Save Progress (ie. save without any validation) or Save and Submit where validation kicks in across both forms... meaning cross checking which state the other form is in.  Currently solving with repetition of long switch statements.

This feature would allow me store Form names as Strings in a Collection and "variablize" my code.

Another alternative is to allow Form objects in a Collection ( right now I cannot get this working though Forum Post - Forms as Objects in Collections  ).

Would this alternative help your use case?  

 

 

jblomberg
Helper I

Agreed. As I'm learning more and more about PowerApps, the lack of this feature stands in the way of making a lot of things more dynamic, because it's forcing us to semi-hardcode lots of different things across our apps. Implementing this suggestion would enable us to use our creativity and create amazing dynamic experiences, with only a handful of actions left to maintain an app.