Embed Control

The Embed control is an Advance Display control that is used to embed Websites, Videos and even PDFs on the respective forms created for the Apps.

The Embed control is useful in scenarios where you are putting external website data as a part of your website, like embedding data reports, dashboard, partner links, and so on from permitted URLs.

Properties

UI Properties

  • Label: Label is the text that is displayed above the control and helps the user to understand the purpose of the Control.

  • Properties: These properties help you customize the Label by changing the text size, weight ( Light, Normal, Bold, Extra Bold, X Extra Bold), alignment (Left, Center, Right, Justified) and color of the label.

  • Type: The Type field is automatically generated depending upon the type of control used. In this case, it is a “dhq_embed_pdf” type.

  • Unique Name: A Unique Name is used to uniquely identify a control in your App. Every control that is added on the screen gets an auto-generated Unique Name on the basis of the Label name given to the control.

  • Hidden: The hidden option helps you to hide the field from the user. This might help to perform some computation you don’t want the user to see or if you want to show certain fields only when a specific condition is met/not met.

  • Caching: When the caching option is selected and if a LOOKUP formula is applied to this control, the state that the LOOKUP returns will be cached and the user will be able to see this state of the field even when the user accesses the microapp later with no connectivity. This option is required when you want your app to be accessible in offline mode as well and getting the latest data from the sheets always is not critical.

  • Hide Label: This option hides the label of the control from the view.

  • Trigger dependents: When you Disable Trigger Dependents, it helps you to reduce or optimize the unnecessary evaluation of the dependent control’s formula. For a detailed explanation refer to this article here .
    By default, Trigger dependents is enabled. However, in complex apps by switching it off, you would limit the evaluation in the dependent control and in turn ensure quicker response times.

Properties

Embed control properties

  • Auto Height: This is used to enable or disable whether the height of the Embed control would be automatically set. You can toggle to switch on or off to specify Auto Height setting. In case you switch off then the Height property would be enabled where you can provide the height accordingly in pixels or as a percentage or vw or vh (viewport width or viewport height).

  • Show border Here you would specify whether there would be a border to the Embed control’s frame.

  • Frame Width: This is the width you specify in pixels or as a percentage or vw or vh (viewport width or viewport height).

  • Min Height: When you toggle switch ON the Auto height you would set the minimum height that should be maintained depending upon your overall app design.

  • Document URL: Here you would specify the URL of the video to be embedded on your form

How to Use an Embed Control?

The Embed control is available under Controls > Advance Display section.

Add the Embed control to your form. Set the properties mentioned above. This control accepts a public link of the websites, videos and even public pdfs. You need to have an active internet connection when accessing the file. Provide the valid link to the Embed URL property. For the sake of this example let us take the URL from Wikipedia and see how to pass the URL.

Other options to provide the URL to embed is by using the Data options like Static Data, Sheets, Controls, Variables, and even Custom Formula.

Bind Data

  1. Static Data: This is the data that does not change over the period of time. Such data is used to assign default values in fields in your application. The static data can be based on the data type i.e. Numeric, Text, and List type data.

  2. Sheets : This allows you to fetch data from a sheet and display it in the fields. Select your sheet from the list and then select the columns to be used. You can also add filters and sort data.

  3. Controls: This allows you to get data from one of the App controls.

  4. Variables: This assigns the value of the variables defined in the app.

  5. LoggedIn User: You can display the properties related to the LoggedIn User like username, usermail, Admin, status and so on. You can select a single property only . Select column and click Save .

  6. API: This allows you to add an API and select the values returned by the respective API. You can select multiple keys to display values in the detail view.

  7. Custom Formula : This can be used to apply formulas and store the output of those formulas in the detail view rows. You can learn more about formulas here.

Note: It is important to provide valid URLs for websites that permit the embedding of their links into other apps and pages. Typically Wikipedia allows embedding, however, Google.com, Youtube, and several others do not permit embedding their links so you would have to verify the permissions for the respective URLs that you intend to use.

Preview

Here for the sake of this example we are taking a URL of the Wikipedia page and assigning it as dynamic input using the Text control.

So now when you take a preview or run the form it will appear as follows:

In the right-hand corner of the control, you can see the buttons to Refresh the page. You can also open the page in a new tab.