apps
latest
false
Apps User Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Jun 17, 2024

Set External Context

Introduction

You can set up an external context when launching your application. This is especially helpful when starting an app from somewhere else, for example a robotic process automation (RPA) process.

Demo app - try it yourself

To try setting the external content yourself, use the demo app or follow the procedure.

Demo app - instructions to use

  1. Run the demo app. All the expressions using the App.QueryParam function should display their default values.
  2. To reset expressions to their default values, click the Next page button.

  3. Copy the following syntax and append it in the app URL after the el=vb part:
    &intv=3200&guidv="81a130d2-502f-4cf1-a376-63edeb000e9f"&sv=queryparam&bv=true&dv=1000000.222&datetimev="2/1/2022 11:00:00 AM"&datetimeoffv="4/2/2007 7:23:57 PM"&listv={"data":["apps","engineering","team"]}&file={"Name":"image","FileSize":25}&intv=3200&guidv="81a130d2-502f-4cf1-a376-63edeb000e9f"&sv=queryparam&bv=true&dv=1000000.222&datetimev="2/1/2022 11:00:00 AM"&datetimeoffv="4/2/2007 7:23:57 PM"&listv={"data":["apps","engineering","team"]}&file={"Name":"image","FileSize":25}
  4. To display an image in the document viewer, add URL="https://my-public-image-URL" in the file parameter. For example:
    file={"Name":"image","FileSize":25, URL="https://my-public-image-URL"}file={"Name":"image","FileSize":25, URL="https://my-public-image-URL"}
  5. Press Enter and watch the values being updated.

Procedure

Note:
To reference the external context using VB expressions, use the App.QueryParam() function.
Query parameters are case sensitive For example, intv and INTV are treated differently.
  1. Add a Textbox control.
  2. For the Text property, open the Expression editor.

  3. Bind the query parameter function to the Text property by using the App.QueryParam() function:
    App.QueryParam(Of Integer)("intv", 100).ToStringApp.QueryParam(Of Integer)("intv", 100).ToString
    Important:
    Inside the App.QueryParam() brackets, specify the data type of the value you are passing in the URL. For example, if the value is an integer, you need to specify App.QueyParam(Of Integer).
  4. Publish the app. At the initial runtime, you should see the default value specified using the App.QueyParam() function, which is 100.
  5. Add query parameters after the el=vb part in the runtime URL by using the & character, then press Enter. For example, el=vb&intv=250.
    The textbox should display 250.
  • Introduction
  • Demo app - try it yourself
  • Demo app - instructions to use
  • Procedure

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.