Skip to main content

Use ancoreMate in Power Apps

The ancoreMate connectors also work in Power Apps canvas apps. An app can show Qlik Cloud key figures, start a reload with a button and show its status. Long-running actions such as Reload app and wait or reports belong in a flow that the app calls.

Before you begin​

  • A Power Apps license that includes premium connectors.
  • An ancoreMate connection, as for Power Automate. See Use ancoreMate in Microsoft Power Automate.
  • Add the ancoreMate connectors you need to the app as data sources, for example ancoreMate Reloads and ancoreMate App Data.

What works in an app​

Works directly in the appRun from a flow instead
Reading actions, for example Evaluate expression, List apps, Get reloadReload app and wait, Wait for reloads
Actions that answer at once, for example Reload appExport sheet, Export chart, Export chart data, Create report from template
Error messages of ancoreMateTriggers – they work only in flows
Long-running actions return an empty result in apps

Power Apps does not wait for the result of a long-running action. The action returns an empty value without an error, even though the work in Qlik Cloud succeeds.

Call an action​

Power Apps passes the inputs of an action as separate parameters. For example, read a key figure:

Set(vSales, ancoreMateAppData.EvaluateExpression("<app ID>", "Sum(Sales)"))

vSales.number then contains the value, vSales.text the formatted text.

Reload an app and show its status​

Start the reload with Reload app, which answers at once, and ask for its status with Get reload until it has finished.

  1. Add a button. Set OnSelect to:

    Set(vReload, ancoreMateReloads.ReloadApp("<app ID>"));
    Set(vPolling, true)
  2. Add a timer. Set Duration to 5000, Repeat to true and Start to vPolling. Set OnTimerEnd to:

    Set(vReload, ancoreMateReloads.GetReload(vReload.id));
    If(vReload.status in ["SUCCEEDED", "FAILED", "CANCELED", "EXCEEDED_LIMIT"], Set(vPolling, false))
  3. Add a label with the text vReload.status.

Verify the result​

Select the button. The label shows QUEUED or RELOADING and, when the reload has finished, SUCCEEDED or FAILED.

Reports and waiting from an app​

Run long-running actions in a flow that the app calls:

  1. In Power Automate, create a flow with the trigger When Power Apps calls a flow (V2).
  2. Add the long-running action, for example Export sheet or Reload app and wait. The flow waits for the result – see Long-running actions.
  3. Pass the result on, for example save the file in SharePoint, and return what the app needs with Respond to a Power App or flow.
  4. In the app, add the flow and call it from a button.

Next steps​