PowerFx | DataSourceInfo function
Image Source: Shutterstock.com
Jun 29, 2023 10:00 PM

PowerFx | DataSourceInfo function

External Blog Post

Assume that you are building a Canvas app using ‘Accounts’ table of Dataverse datasource and you need to show a button only if the logged in user has ‘Delete’

Power Fx is a DataSourceInfo function that can be used in building a Canvas app using the 'Accounts' table of Dataverse datasource. This function allows you to show a button only if the logged in user has 'Delete' permission on the 'Accounts' table. The DataSourceInfo function provides information about a particular column of a data source as well as permission details, such as Create, Read, Write and Delete permissions.

  • Dataverse is a data platform used in Power Apps.
  • Power Fx enables you to determine user permissions on data sources.
  • DataSourceInfo function provides details about columns and user permissions.
  • This information is useful for displaying buttons and other UI elements based on user permissions.

For example, to get the 'Display Name' and 'Max Length' of a column, the DataSourceInfo function can be used as follows:

 "MaxLength of 'name' column is - "& DataSourceInfo(Accounts, DataSourceInfo.MaxLength)

More About Power Fx

Power Fx is a low-code programming language used in Microsoft Power Apps. It's designed for ease of use, allowing app makers to create custom solutions without requiring extensive programming knowledge. Power Fx enables users to build apps with rich functionality that can connect to various data sources, automate processes and integrate with other Microsoft services, such as Power BI and Power Automate. The DataSourceInfo function is just one example of the powerful features offered by Power Fx, helping app makers create dynamic and user-specific experiences in their Canvas apps.

Read the full article Power Fx | DataSourceInfo function

Learn about Power Fx | DataSourceInfo function

The Microsoft Power Fx DataSourceInfo function is a useful tool when creating Canvas apps using the Dataverse datasource. It can provide information such as the display name and max length of a particular column, as well as the permission details for users. For example, you can use DataSourceInfo to determine if the logged-in user has delete permission on a table. This can be done by calling the DataSourceInfo function with two parameters: the datasource and the DataSourceInfo.MaxLength. This will return the max length of the column specified. DataSourceInfo can also provide information regarding create, read, write, and delete permission for users. In order to use DataSourceInfo, you need to call the function with parameters for the datasource and the desired information you want to retrieve. This will allow you to easily determine the permission details of the logged-in user, as well as the display name and max length of a column.

More links on about Power Fx | DataSourceInfo function

DataSourceInfo function in Power Apps - Power Platform
Feb 22, 2023 — Data-source information ... DataSourceInfo returns true if it cannot determine whether the current user has the requested permission. Permissions ...
Datasourceinfo Function In Power Apps And Displaying ...
Jan 30, 2023 — This article talks about the datasourceinfo function of PowerApps and how it can be leveraged to control the accessibility of forms and ...
The Complete Power Apps Functions List
A cheat sheet with all 150+ Power Apps functions with links to the official documentation and also some hidden undocumented functions.
Microsoft Power Fx overview
Power Fx binds objects together with declarative spreadsheet-like formulas. For example, think of a UI control's Visible property as a spreadsheet cell, with an ...
'With' Function in Power Apps(Power Fx)
Feb 20, 2023 — In this blog, we'll look at the “with” function in the Power Fx command/Canvas App. Using With function, you may split up lengthy formulas into ...
Top 10 Power Apps Functions You Should Know in 2023
PowerFX, is a formula language for PowerApps that allows users to write custom logic for their apps using a combination of pre-built functions and custom code.
Filter function in Canvas Power Apps | Power Fx Formula ...
Nov 20, 2022 — Filter() in Canvas Apps · Start by typing Filter while the target Gallery is selected under Items property and you'll see that it's a valid ...

Keywords

DataSourceInfo Function, Power Apps, Canvas App, Dataverse, Permissions, Delete Permission.