cancel
Showing results for 
Search instead for 
Did you mean: 
LRVinNC

Tip: Include a Demo Function in your App

Do you frequently need to demonstrate the functionality of an application that operates differently based on on the specific user logged on? Or perhaps you are providing support and need to be able to quickly diagnose user issues?  Consider building in a demo function.

I frequently found myself doing demos and training on a multi-persona application that included unique user experiences for five different groups of users:
1.  Individual users

2.  Managers

3.  Resource Managers

4.  Regional Resource Manager Administrators

5.  Global Support Staff

 

When I first wrote my application, I found myself adding lines of code to the App.OnStart to tell the system I was a different user than I really was.  This got old fast and was an accident waiting to happen if I published the app with this additional code still activated. 

Sp, in order to readily demonstrate application performance for each of these types of users, I created a demo function accessed by a demo button on the home page which was displayed ONLY for me by setting the visible property of the button with a condition that evaluates to true like User().Email = "myemail@domain.com".

Demo1.jpg
Selecting Demo will navigate to a simple screen full of additional buttons.

Demo2.jpg

 

Under normal operations (without using the demo button), the application detects my identity during the App.OnStart and then displays the appropriate content.  Using the demo buttons allows me to override the normal operations and masquerade as a different user.

 

For example,  clicking on "Demo based on Email Address", opens a text input field to enter an email address.  If I enter the email address of a consultant, I see the simplest interface which simply allows the individual to submit and display their own documents.  If instead, I enter the email address of a manager, I will display the manager screen which will list all of the manager's direct reports.
Additionally, I can enter the email address of a resource manager or region admin to see the what that individual resource manager is would be seeing on their screen.  This is a tremendous time saver when providing support or diagnosing problems in the field.  

Be sure to provide a button to allow you to return to normal operations.  This may include additional buttons to reset variables used when working as an alternate persona.  For example, the "Set as Global" button shown above, will reset a variable to indicate I am working as the global support person.

Exactly how you set up your demo controls will vary, but adding this simple feature to your application can save you time and effort in the future.

Comments

@LRVinNC great idea, I might start using this concept myself!!