top of page
Writer's pictureThe Tech Platform

Power Apps (Basics on Formulas, Search, Filter, Patch function) - Session 4

The Tech Platform Presents Talks with Aroh Shukla on Power Apps (Basics on Formulas, Search, Filter, Patch function).

Subscribe us at www.thetechplatform.com for more articles and live events.

Below we have the links for Youtube and Facebook Video:



Understanding Power Apps Formula


Overview:

  • Each Control can have many properties

  • Formulas make up the definition for the

  • Control properties in your app

Configure your canvas app with formulas that not only calculate values and perform other tasks (as they do in Excel) but also respond to user input (as an app requires).

  • In Excel, you build formulas that, for example, populate cells and create tables and charts.

  • In Power Apps, you build similar formulas as you configure controls instead of cells. In addition, you build formulas that apply specifically to apps instead of spreadsheets.


Different From Traditional Coding - Think Like Excel

  1. PowerApps Formulas are very similar to Excel Formulas

  2. Lots of small pieces of code rather than complex scripts.

  3. As things change in the app formulas are automatically recalculated.

  4. Formulas can reference other properties like referencing other cells in a spreadsheet


Formula syntax

As you type a formula in the formula bar, different syntax elements appear in different colors to improve readability and help you understand long formulas. Here is the color code list in Power Apps.



Formula reference for Power Apps


Formulas combine many elements. Listed below are:

  • Functions take parameters, perform an operation, and return a value. For example, Sqrt(25) returns 5. Functions are modeled after Microsoft Excel functions. Some functions have side effects, such as SubmitForm, which are appropriate only in a behavior formula such as Button.OnSelect.

  • Signals return information about the environment. For example, Location returns the device's current GPS coordinates. Signals don't take parameters or have side effects.

  • Enumerations return a pre-defined constant value. For example, Color is an enumeration that has pre-defined values for Color.Red, Color.Blue, and so forth. Common enumerations are included here; function-specific enumerations are described with the function.

  • Named operators, such as ThisItem and Self, provide access to information from within a container.


Click on the below link to read the properties in details.


A

  1. Abs – Absolute value of a number.

  2. Acceleration – Reads the acceleration sensor in your device.

  3. Acos – Returns the arccosine of a number, in radians.

  4. Acot – Returns the arccotangent of a number, in radians.

  5. AddColumns – Returns a table with columns added.

  6. And – Boolean logic AND. Returns true if all arguments are true. You can also use the && operator.

  7. App – Provides information about the currently running app and control over the app's behavior.

  8. Asin – Returns the arcsine of a number, in radians.

  9. Assert – Evaluates to true or false in a test.

  10. As – Names the current record in gallery, form, and record scope functions such as ForAll, With, and Sum.

  11. AsType – Treats a record reference as a specific entity type.

  12. Atan – Returns the arctangent of a number, in radians.

  13. Atan2 – Returns the arctangent based on an (x,y) coordinate, in radians.

  14. Average – Calculates the average of a table expression or a set of arguments.

B

  1. Back – Displays the previous screen.

  2. Blank – Returns a blank value that can be used to insert a NULL value in a data source.

C

Calendar – Retrieves information about the calendar for the current locale.

  1. Char – Translates a character code into a string.

  2. Choices – Returns a table of the possible values for a lookup column.

  3. Clear – Deletes all data from a collection.

  4. ClearCollect – Deletes all data from a collection and then adds a set of records.

  5. Clock – Retrieves information about the clock for the current locale.

  6. Coalesce – Replaces blank values while leaving non-blank values unchanged.

  7. Collect – Creates a collection or adds data to a data source.

  8. Color – Sets a property to a built-in color value.

  9. ColorFade – Fades a color value.

  10. ColorValue – Translates a CSS color name or a hex code to a color value.

  11. Compass – Returns your compass heading.

  12. Concat – Concatenates strings in a data source.

  13. Concatenate – Concatenates strings.

  14. Concurrent – Evaluates multiple formulas concurrently with one another.

  15. Connection – Returns information about your network connection.

  16. Count – Counts table records that contain numbers.

  17. Cos – Returns the cosine of an angle specified in radians.

  18. Cot – Returns the cotangent of an angle specified in radians.

  19. CountA – Counts table records that aren't empty.

  20. CountIf – Counts table records that satisfy a condition.

  21. CountRows – Counts table records.

D

  1. DataSourceInfo – Provides information about a data source.

  2. Date – Returns a date/time value, based on Year, Month, and Day values.

  3. DateAdd – Adds days, months, quarters, or years to a date/time value.

  4. DateDiff – Subtracts two date values, and shows the result in days, months, quarters, or years.

  5. DateTimeValue – Converts a date and time string to a date/time value.

  6. DateValue – Converts a date-only string to a date/time value.

  7. Day – Retrieves the day portion of a date/time value.

  8. Defaults – Returns the default values for a data source.

  9. Degrees - Converts radians to degrees.

  10. Disable – Disables a signal, such as Location for reading the GPS.

  11. Distinct – Summarizes records of a table, removing duplicates.

  12. Download – Downloads a file from the web to the local device.

  13. DropColumns – Returns a table with one or more columns removed.

E

  1. EditForm – Resets a form control for editing of an item.

  2. Enable – Enables a signal, such as Location for reading the GPS.

  3. EncodeUrl – Encodes special characters using URL encoding.

  4. EndsWith – Checks whether a text string ends with another text string.

  5. Errors – Provides error information for previous changes to a data source.

  6. exactin – Checks if a text string is contained within another text string or table, case dependent. Also used to check if a record is in a table.

  7. Exit – Exits the currently running app and optionally signs out the current user.

  8. Exp - Returns e raised to a power.

F

  1. Filter – Returns a filtered table based on one or more criteria.

  2. Find – Checks whether one string appears within another and returns the location.

  3. First – Returns the first record of a table.

  4. FirstN – Returns the first set of records (N records) of a table.

  5. ForAll – Calculates values and performs actions for all records of a table.

G

  1. GroupBy – Returns a table with records grouped together.

  2. GUID – Converts a GUID string to a GUID value or creates a new GUID value.

H

  1. HashTags – Extracts the hashtags (#strings) from a string.

  2. Hour – Returns the hour portion of a date/time value.

I

  1. If – Returns one value if a condition is true and another value if not.

  2. IfError - Detects errors and provides an alternative value or takes action.

  3. in – Checks if a text string is contained within another text string or table, case independent. Also used to check if a record is in a table.

  4. IsBlank – Checks for a blank value.

  5. IsEmpty – Checks for an empty table.

  6. IsError – Checks for an error.

  7. IsMatch – Checks a string against a pattern. Regular expressions can be used.

  8. IsNumeric – Checks for a numeric value.

  9. IsToday – Checks whether a date/time value is sometime today.

  10. IsType – Checks whether a record reference refers to a specific entity type.

J

  1. JSON - Generates a JSON text string for a table, a record, or a value.

L

  1. Language – Returns the language tag of the current user.

  2. Last – Returns the last record of a table.

  3. LastN – Returns the last set of records (N records) of a table.

  4. Launch – Launches a webpage or a canvas app.

  5. Left – Returns the left-most portion of a string.

  6. Len – Returns the length of a string.

  7. Ln – Returns the natural log.

  8. LoadData – Loads a collection from a local device's storage.

  9. Location – Returns your location as a map coordinate by using the Global Positioning System (GPS) and other information.

  10. LookUp – Looks up a single record in a table based on one or more criteria.

  11. Lower – Converts letters in a string of text to all lowercase.

M

  1. Match – Extracts a substring based on a pattern. Regular expressions can be used.

  2. MatchAll – Extracts multiple substrings based on a pattern. Regular expressions can be used.

  3. Max – Maximum value of a table expression or a set of arguments.

  4. Mid – Returns the middle portion of a string.

  5. Min – Minimum value of a table expression or a set of arguments.

  6. Minute – Retrieves the minute portion of a date/time value.

  7. Mod – Returns the remainder after a dividend is divided by a divisor.

  8. Month – Retrieves the month portion of a date/time value.

N

  1. Navigate – Changes which screen is displayed.

  2. NewForm – Resets a form control for creation of an item.

  3. Not – Boolean logic NOT. Returns true if its argument is false, and returns false if its argument is true. You can also use the ! operator.

  4. Notify – Displays a banner message to the user.

  5. Now – Returns the current date/time value.

O

  1. Or – Boolean logic OR. Returns true if any of its arguments are true. You can also use the || operator.

P

  1. Param – Access parameters passed to a canvas app when launched.

  2. Parent – Provides access to a container control's properties.

  3. Patch – Modifies or creates a record in a data source, or merges records outside of a data source.

  4. Pi – Returns the number π.

  5. PlainText – Removes HTML and XML tags from a string.

  6. Power – Returns a number raised to a power. You can also use the ^ operator.

  7. Proper – Converts the first letter of each word in a string to uppercase, and converts the rest to lowercase.

R

  1. Radians - Converts degrees to radians.

  2. Rand – Returns a pseudo-random number.

  3. Refresh – Refreshes the records of a data source.

  4. Relate – Relates records of two entities through a one-to-many or many-to-many relationship.

  5. Remove – Removes one or more specific records from a data source.

  6. RemoveIf – Removes records from a data source based on a condition.

  7. RenameColumns – Renames columns of a table.

  8. Replace – Replaces part of a string with another string, by starting position of the string.

  9. RequestHide – Hides a SharePoint form.

  10. Reset – Resets an input control to its default value, discarding any user changes.

  11. ResetForm – Resets a form control for editing of an existing item.

  12. Revert – Reloads and clears errors for the records of a data source.

  13. RGBA – Returns a color value for a set of red, green, blue, and alpha components.

  14. Right – Returns the right-most portion of a string.

  15. Round – Rounds to the closest number.

  16. RoundDown – Rounds down to the largest previous number.

  17. RoundUp – Rounds up to the smallest next number.

S

  1. SaveData – Saves a collection to a local device's storage.

  2. Search – Finds records in a table that contain a string in one of their columns.

  3. Second – Retrieves the second portion of a date/time value.

  4. Select – Simulates a select action on a control, causing the OnSelect formula to be evaluated.

  5. Self – Provides access to the properties of the current control.

  6. Sequence – Generate a table of sequential numbers, useful when iterating with ForAll.

  7. Set – Sets the value of a global variable.

  8. SetFocus – Moves input focus to a specific control.

  9. SetProperty – Simulates interactions with input controls.

  10. ShowColumns – Returns a table with only selected columns.

  11. Shuffle – Randomly reorders the records of a table.

  12. Sin – Returns the sine of an angle specified in radians.

  13. Sort – Returns a sorted table based on a formula.

  14. SortByColumns – Returns a sorted table based on one or more columns.

  15. Split – Splits a text string into a table of substrings.

  16. Sqrt – Returns the square root of a number.

  17. StartsWith – Checks if a text string begins with another text string.

  18. StdevP – Returns the standard deviation of its arguments.

  19. Substitute – Replaces part of a string with another string, by matching strings.

  20. SubmitForm – Saves the item in a form control to the data source.

  21. Sum – Calculates the sum of a table expression or a set of arguments.

  22. Switch – Matches with a set of values and then evaluates a corresponding formula.

T

  1. Table – Creates a temporary table.

  2. Tan - Returns the tangent of an angle specified in radians.

  3. Text – Converts any value and formats a number or date/time value to a string of text.

  4. ThisItem – Returns the record for the current item in a gallery or form control.

  5. ThisRecord – Returns the record for the current item in a record scope function, such as ForAll, With, and Sum.

  6. Time – Returns a date/time value, based on Hour, Minute, and Second values.

  7. TimeValue – Converts a time-only string to a date/time value.

  8. TimeZoneOffset – Returns the difference between UTC and the user's local time in minutes.

  9. Today – Returns the current date/time value.

  10. Trace - Provide additional information in your test results.

  11. Trim – Removes extra spaces from the ends and interior of a string of text.

  12. TrimEnds – Removes extra spaces from the ends of a string of text only.

U

  1. Ungroup – Removes a grouping.

  2. Unrelate – Unrelates records of two entities from a one-to-many or many-to-many relationship.

  3. Update – Replaces a record in a data source.

  4. UpdateContext – Sets the value of one or more context variables of the current screen.

  5. UpdateIf – Modifies a set of records in a data source based on a condition.

  6. Upper – Converts letters in a string of text to all uppercase.

  7. User – Returns information about the current user.

V

  1. Validate – Checks whether the value of a single column or a complete record is valid for a data source.

  2. Value – Converts a string to a number.

  3. VarP – Returns the variance of its arguments.

  4. ViewForm – Resets a form control for viewing of an existing item.

W

  1. Weekday – Retrieves the weekday portion of a date/time value.

  2. With – Calculates values and performs actions for a single record, including inline records of named values.

Y

  1. Year – Retrieves the year portion of a date/time value


Click on the link below to read the properties in details.



The Tech Platform


0 comments

Comments


bottom of page