Canvas App – Quick Reference


Recently we were working on Canvas Apps so thought of listing down some of the key points for quick reference

  • Use Items property for defining values for Drop Down and Combo Box.

Items = [“Branch”,”Country”]


  • Use DefaultSelectedItems for Setting Default values for Combo Box.

DefaultSelectedItems = [“Branch”]

  • To disable multiple selections for Combo Box set SelectMutiple as false

SelectMultiple = false


  • Change Data Source of Gallery based on Combo Box selected value

Items = If(ComboBox1.Selected.Value = “Branch”, Branches, Countries)


  • Filter Gallery’s data based on Text Box (string search)

Items = If(ComboBox1.Selected.Value = “Branch”,Filter(Branches,searchInput.Text in cre9d_value ||searchInput.Text in cre9d_name), Filter(Countries,searchInput.Text in cre9d_value ||searchInput.Text in cre9d_name))

Filter à

Search à

  • Unlock the Data Card field within the form to make changes to its properties

  • Use Navigate to move to a different Screen on OnSelect of Button

Navigate(Screen2, ScreenTransition.Fade)

  • The first item of the Gallery acts as a template

  • Use TemplateFill property to highlight the selected item in the Gallery.

TemplateFill = If(ThisItem.IsSelected,RGBA(233,150,150,10))

  • Use Sort to sort the Data Source for Items property

Items = Sort(Requests,’Created On’,Descending)

  • Fetch User’s Security Role and hide and show control based on it.

If(LookUp([@’Security Roles’], Name = “Maker”, Role) in Concat(LookUp([@Users], ‘Primary Email’ = User().Email).’Security Roles (systemuserroles_association)’, Role & “;”), true, false)

  • Submit, Reset, and New Form on saving a record on OnSelect of Button

SubmitForm(frmRequest);

ResetForm(frmRequest);

NewForm(frmRequest);

  • DataField is the most important property of the DataCard, which binds the control to the field in the Data Source.

The default value of the DataCard.

  • ThisItem is how we interact with the current record.

  • On SubmitForm – the form control reads the value of DataField property of all the cards to find the field to change and the value of each card from the Update property.

  • Clear Button and Enable Spell Check option for Text Input

checks for the spelling as well provide the option to clear the text box as shown below.

Update / Set a Contextual Variable (referenced on the screen where they are created) 

UpdateContext({varCount: 1, varActive: true, varName: User().FullName})

Set a global variable (available across the app

Set(varCount, 1);Set(varActive, true);Set(varName, User().FullName)

  • With UpdateContext we can declare more than one variable at a time, which is not possible with global variable.
  • Use GUID function à

To generate a new GUID use  GUID()

To convert a string to GUID(“0f8fad5b-d9cb-469f-a165-70867728950e”)

  • To set a variable null – Set(myNullVar, Blank())
  • GroupBy  function – returns a table with records grouped together based on the values in one or more columns.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby

GroupByTableColumnName1 [, ColumnName2, … ], GroupColumnName )

  • ForAll function – to evaluate a formula against all records of a Table

ForAll(TableFormula)

  • Table – Required. Table to be acted upon.
  • Formula – Required. The formula to evaluate for all records of the Table.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-forall

  • Component – Reusable control

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-component

  • Pass parameter 

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-param#param

  • Patch gives more control than SubmitForm

https://sharepains.com/2020/06/19/patch-vs-submitform-vs-update-power-apps/

  • Delegable data sources – Dataverse, SharePoint, SQL Server

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

https://docs.microsoft.com/en-us/connectors/commondataservice/#power-apps-delegable-functions-and-operations-for-dataverse

  • Get the response from Power Automate

  • App OnStart Property

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/object-app#onstart-property

  • Using Excel as Static Data for the app.

http://powerappsguide.com/blog/post/code-how-to-define-a-read-only-table-of-static-data

  • Connection.Connected (Offline) – to check if app is connected to network or not.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/signals#connection

  • Concurrent Function to evaluate multiple formulas at the same time.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-concurrent

  • IfError for Error handling

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-iferror#iferror

  • AppChecker – for checking the canvas app for accessibility.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/accessibility-checker

Hope it helps ..

Advertisements

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

4 thoughts on “Canvas App – Quick Reference”

Please share your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Power Spark

Power Spark By Shrangarika

Van Carl Nguyen

Exploration of Power Platform

My Trial

It is my experience timeline.

Power⚡Thomas

Sharing my knowledge and experience about the Microsoft Power Platform.

Arpit Power Guide

a guide to powering up community

Welcome to the Blog of Paul Andrew

Sponsored by Cloud Formations Ltd

Deriving Dynamics 365

Deriving Solutions and features on Power Platform/Dynamics 365

The CRM Ninja

Thoughts & musings from a Dynamics 365 Ninja!

D CRM Explorer

Learn about Microsoft Dynamics CRM Power Platform customization and implementation and other cool stuffs

Stroke // Jonas Rapp

I know pre-stroke. I will improve who I was.

Power Melange

Power Melange By Shalinee

Clavin's Blog

Power Automate - Power Apps - SharePoint Online - Azure - Nintex - K2 - Artificial Intelligence

Sat Sangha Salon

An Inquiry in Being

The Indoencers

The Influencers & Influences of Indian Music

Monika Halan's blog

Hand's-free money management

D365 Demystified

A closer look at Microsoft Dynamics 365.

Microsoft Mate (msftmate) - Andrew Rogers

Experienced consultant primarily focused on Microsoft Dynamics 365 and the Power Platform

Knowhere365

Specific topics by Django Lohn on the whole Microsoft365 Stack

Manmit Rahevar's Blog

One Stop Destination for Microsoft Technology Solutions

MG

Naturally Curious

Brian Illand

Power Platform and Dynamics 365

Steve Mordue MVP

A Microsoft Business Applications MVP

Subwoofer 101

Bass defines your home theater

SQLTwins by Nakul Vachhrajani

SQL Server tips and experiences dedicated to my twin daughters.

Everything D365

Discovering Azure DevOps and D365 Business Applications

Tech Wizard

Lets do IT Spells

XRM Tricks (Power Platform & Dynamics CRM )

Power Platform & Dynamics CRM

CRM TIPS BY PRM

Mail to crmtipsbyprm@gmail.com for queries and suggestions

nijos.dev

Giving back to the community what I have learned

xrm CRM Dynamics

Dynamics CRM Technical & Functional Info

Dynamics 365 Blogs - Explained in unique way

Sometimes you need to look at things from different perspective.

CRM Keeper

Dynamics 365 Customer Engagement, CRM, Microsoft CRM, Dynamics CRM