Bhubaneswar, Odisha, India
+91-8328865778
support@softchief.com

Most used PowerFX in Canvas APP List

Most used PowerFX in Canvas APP List

In Power Apps, specifically when creating Canvas apps, lists play a crucial role in managing data and performing various operations. Power Fx, the formula language for Power Apps, includes several important list functions. Here are some of the most important Power Fx list functions commonly used in Canvas apps: 

  1. Collect:
    • Purpose: Creates or updates a collection.
    • Usage: Collect(CollectionName, Item1, Item2, ...)
    • Example: Collect(Students, {Name: "John", Age: 18})
  2. ClearCollect:
    • Purpose: Clears all records from a collection and then adds new records.
    • Usage: ClearCollect(CollectionName, Item1, Item2, ...)
    • Example: ClearCollect(Students, {Name: "Jane", Age: 19})
  3. Clear:
    • Purpose: Removes all records from a collection.
    • Usage: Clear(CollectionName)
    • Example: Clear(Students)
  4. Patch:
    • Purpose: Modifies or creates a record in a data source.
    • Usage: Patch(DataSource, Defaults(DataSource), {Field1: Value1, Field2: Value2})
    • Example: Patch(Students, Defaults(Students), {Name: "Alice", Age: 20})
  5. Remove:
    • Purpose: Removes a specific record or records from a data source.
    • Usage: Remove(DataSource, Record)
    • Example: Remove(Students, ThisRecord)
  6. RemoveIf:
    • Purpose: Removes records from a data source based on a condition.
    • Usage: RemoveIf(DataSource, Condition)
    • Example: RemoveIf(Students, Age < 18)
  7. ForAll:
    • Purpose: Performs actions on each record of a table.
    • Usage: ForAll(Table, Action)
    • Example: ForAll(Students, Patch(Students, ThisRecord, {Age: Age + 1}))
  8. Filter:
    • Purpose: Filters records of a data source based on a condition.
    • Usage: Filter(DataSource, Condition)
    • Example: Filter(Students, Age > 18)
  9. LookUp:
    • Purpose: Finds the first record in a data source that meets a specified condition.
    • Usage: LookUp(DataSource, Condition)
    • Example: LookUp(Students, Name = "John")
  10. Sort:
    • Purpose: Sorts a table based on one or more columns.
    • Usage: Sort(Table, Column, SortOrder)
    • Example: Sort(Students, Age, Ascending)
  11. SortByColumns:
    • Purpose: Sorts a table based on the values in one or more columns.
    • Usage: SortByColumns(Table, Column, SortOrder)
    • Example: SortByColumns(Students, "Name", Ascending)
  12. Search:
    • Purpose: Searches for records in a table that contain a specified string.
    • Usage: Search(Table, SearchString, Column1, Column2, ...)
    • Example: Search(Students, "John", "Name")
  13. FirstN:
    • Purpose: Returns the first N records of a table.
    • Usage: FirstN(Table, N)
    • Example: FirstN(Students, 5)
  14. LastN:
    • Purpose: Returns the last N records of a table.
    • Usage: LastN(Table, N)
    • Example: LastN(Students, 5)
  15. AddColumns:
    • Purpose: Adds calculated columns to a table.
    • Usage: AddColumns(Table, ColumnName, Calculation)
    • Example: AddColumns(Students, "FullName", FirstName & " " & LastName)
  16. DropColumns:
    • Purpose: Removes specified columns from a table.
    • Usage: DropColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: DropColumns(Students, "Address")
  17. ShowColumns:
    • Purpose: Creates a table with only specified columns.
    • Usage: ShowColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: ShowColumns(Students, "Name", "Age")
  18. GroupBy:
    • Purpose: Groups records of a table by the values in one or more columns.
    • Usage: GroupBy(Table, ColumnName1, ColumnName2, GroupName)
    • Example: GroupBy(Students, "Class", "Age", "GroupedStudents")
  19. Ungroup:
    • Purpose: Reverts a table that was grouped by the GroupBy function.
    • Usage: Ungroup(Table, GroupName)
    • Example: Ungroup(GroupedStudents, "GroupedStudents")
  20. Concat:
    • Purpose: Concatenates the values of a table into a single string.
    • Usage: Concat(Table, Column, Separator)
    • Example: Concat(Students, Name, ", ")
  21. Sequence:
    • Purpose: Generates a table containing a sequence of numbers.
    • Usage: Sequence(N, Start, Step)
    • Example: Sequence(10, 1, 1)
  22. Sum:
    • Purpose: Calculates the sum of a single-column table.
    • Usage: Sum(Table, Column)
    • Example: Sum(Students, Age)
  23. Average:
    • Purpose: Calculates the average of a single-column table.
    • Usage: Average(Table, Column)
    • Example: Average(Students, Age)
  24. Max:
    • Purpose: Finds the maximum value in a single-column table.
    • Usage: Max(Table, Column)
    • Example: Max(Students, Age)
  25. Min:
    • Purpose: Finds the minimum value in a single-column table.
    • Usage: Min(Table, Column)
    • Example: Min(Students, Age)
  26. AddColumns:
    • Purpose: Adds calculated columns to a table.
    • Usage: AddColumns(Table, ColumnName, Calculation)
    • Example: AddColumns(Students, "FullName", FirstName & " " & LastName)
  27. DropColumns:
    • Purpose: Removes specified columns from a table.
    • Usage: DropColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: DropColumns(Students, "Address")
  28. ShowColumns:
    • Purpose: Creates a table with only specified columns.
    • Usage: ShowColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: ShowColumns(Students, "Name", "Age")
  29. First:
    • Purpose: Returns the first record of a table.
    • Usage: First(Table)
    • Example: First(Students)
  30. Last:
    • Purpose: Returns the last record of a table.
    • Usage: Last(Table)
    • Example: Last(Students)
  31. Distinct:
    • Purpose: Removes duplicate records from a table based on a column.
    • Usage: Distinct(Table, Column)
    • Example: Distinct(Students, Class)
  32. SortByColumns:
    • Purpose: Sorts a table based on the values in one or more columns.
    • Usage: SortByColumns(Table, Column, SortOrder)
    • Example: SortByColumns(Students, "Name", Ascending)
  33. Search:
    • Purpose: Searches for records in a table that contain a specified string.
    • Usage: Search(Table, SearchString, Column1, Column2, ...)
    • Example: Search(Students, "John", "Name")
  34. FirstN:
    • Purpose: Returns the first N records of a table.
    • Usage: FirstN(Table, N)
    • Example: FirstN(Students, 5)
  35. LastN:
    • Purpose: Returns the last N records of a table.
    • Usage: LastN(Table, N)
    • Example: LastN(Students, 5)
  36. LookUp:
    • Purpose: Finds the first record in a data source that meets a specified condition.
    • Usage: LookUp(DataSource, Condition)
    • Example: LookUp(Students, Name = "John")
  37. IsBlank:
    • Purpose: Checks if a table or a column is empty.
    • Usage: IsBlank(Value)
    • Example: IsBlank(Students)
  38. IsEmpty:
    • Purpose: Checks if a table has no records.
    • Usage: IsEmpty(Table)
    • Example: IsEmpty(Students)
  39. CountRows:
    • Purpose: Counts the number of records in a table.
    • Usage: CountRows(Table)
    • Example: CountRows(Students)
  40. CountIf:
    • Purpose: Counts the number of records that meet a condition.
    • Usage: CountIf(Table, Condition)
    • Example: CountIf(Students, Age > 18)
  41. UpdateContext:
    • Purpose: Updates the values of context variables.
    • Usage: UpdateContext({VariableName: Value})
    • Example: UpdateContext({SelectedStudent: First(Students)})
  42. Set:
    • Purpose: Sets the value of a global variable.
    • Usage: Set(VariableName, Value)
    • Example: Set(CurrentUser, User().Email)
  43. Collect:
    • Purpose: Creates or updates a collection.
    • Usage: Collect(CollectionName, Item1, Item2, ...)
    • Example: Collect(Students, {Name: "John", Age: 18})
  44. ClearCollect:
    • Purpose: Clears all records from a collection and then adds new records.
    • Usage: ClearCollect(CollectionName, Item1, Item2, ...)
    • Example: ClearCollect(Students, {Name: "Jane", Age: 19})
  45. Clear:
    • Purpose: Removes all records from a collection.
    • Usage: Clear(CollectionName)
    • Example: Clear(Students)
  46. Patch:
    • Purpose: Modifies or creates a record in a data source.
    • Usage: Patch(DataSource, Defaults(DataSource), {Field1: Value1, Field2: Value2})
    • Example: Patch(Students, Defaults(Students), {Name: "Alice", Age: 20})
  47. Remove:
    • Purpose: Removes a specific record or records from a data source.
    • Usage: Remove(DataSource, Record)
    • Example: Remove(Students, ThisRecord)
  48. RemoveIf:
    • Purpose: Removes records from a data source based on a condition.
    • Usage: RemoveIf(DataSource, Condition)
    • Example: RemoveIf(Students, Age < 18)
  49. ForAll:
    • Purpose: Performs actions on each record of a table.
    • Usage: ForAll(Table, Action)
    • Example: ForAll(Students, Patch(Students, ThisRecord, {Age: Age + 1}))
  50. Filter:
    • Purpose: Filters records of a data source based on a condition.
    • Usage: Filter(DataSource, Condition)
    • Example: Filter(Students, Age > 18)
  51. AddColumns:
    • Purpose: Adds calculated columns to a table.
    • Usage: AddColumns(Table, ColumnName, Calculation)
    • Example: AddColumns(Students, "FullName", FirstName & " " & LastName)
  52. DropColumns:
    • Purpose: Removes specified columns from a table.
    • Usage: DropColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: DropColumns(Students, "Address")
  53. ShowColumns:
    • Purpose: Creates a table with only specified columns.
    • Usage: ShowColumns(Table, ColumnName1, ColumnName2, ...)
    • Example: ShowColumns(Students, "Name", "Age")
  54. All:
    • Purpose: Checks if all records in a table meet a condition.
    • Usage: All(Table, Condition)
    • Example: All(Students, Age >= 18)
  55. Any:
    • Purpose: Checks if any record in a table meets a condition.
    • Usage: Any(Table, Condition)
    • Example: Any(Students, Age >= 18)
  56. With:
    • Purpose: Creates a record and performs a calculation on it.
    • Usage: With(Record, Calculation)
    • Example: With({Name: "John", Age: 18}, Text(Age))
  57. IsMatch:
    • Purpose: Checks if a text string matches a pattern.
    • Usage: IsMatch(Text, Pattern)
    • Example: IsMatch(Email, "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$")
  58. If:
    • Purpose: Conditionally evaluates a sequence of expressions.
    • Usage: If(Condition, ThenResult, ElseResult)
    • Example: If(Age > 18, "Adult", "Minor")
  59. Switch:
    • Purpose: Compares a value to a list of values and returns the corresponding result.
    • Usage: Switch(Formula, Match1, Result1, Match2, Result2, ..., DefaultResult)
    • Example: Switch(Class, "Math", "A", "Science", "B", "C")
  60. Index:
    • Purpose: Returns the value at a specific position in a table.
    • Usage: Index(Table, Index)
    • Example: Index(Students, 1)
  61. Rand:
    • Purpose: Generates a random number between 0 and 1.
    • Usage: Rand()
    • Example: Rand()
  62. RandBetween:
    • Purpose: Generates a random number between two specified numbers.
    • Usage: RandBetween(Low, High)
    • Example: RandBetween(1, 10)
  63. Round:
    • Purpose: Rounds a number to a specified number of decimal places.
    • Usage: Round(Number, DecimalPlaces)
    • Example: Round(3.14159, 2)
  64. RoundUp:
    • Purpose: Rounds a number up to a specified number of decimal places.
    • Usage: RoundUp(Number, DecimalPlaces)
    • Example: RoundUp(3.14159, 2)
  65. RoundDown:
    • Purpose: Rounds a number down to a specified number of decimal places.
    • Usage: RoundDown(Number, DecimalPlaces)
    • Example: RoundDown(3.14159, 2)
  66. Text:
    • Purpose: Converts a value to a text string in a specified format.
    • Usage: Text(Value, Format)
    • Example: Text(Today(), "[$-en-US]dddd, mmmm dd, yyyy")
  67. Value:
    • Purpose: Converts a text string to a number.
    • Usage: Value(Text)
    • Example: Value("123")
  68. DateValue:
    • Purpose: Converts a text string to a date/time value.
    • Usage: DateValue(Text)
    • Example: DateValue("2024-05-21")
  69. TimeValue:
    • Purpose: Converts a text string to a time value.
    • Usage: TimeValue(Text)
    • Example: TimeValue("12:34 PM")
  70. DateAdd:
    • Purpose: Adds an interval to a date/time value.
    • Usage: DateAdd(StartDate, NumberOfUnits, Unit)
    • Example: DateAdd(Today(), 1, Days)
  71. DateDiff:
    • Purpose: Calculates the difference between two date/time values.
    • Usage: DateDiff(StartDate, EndDate, Unit)
    • Example: DateDiff(StartDate, EndDate, Days)
  72. Now:
    • Purpose: Returns the current date and time.
    • Usage: Now()
    • Example: Now()
  73. Today:
    • Purpose: Returns the current date.
    • Usage: Today()
    • Example: Today()
  74. Time:
    • Purpose: Creates a time value from hours, minutes, and seconds.
    • Usage: Time(Hours, Minutes, Seconds)
    • Example: Time(14, 30, 0)
  75. Date:
    • Purpose: Creates a date value from year, month, and day.
    • Usage: Date(Year, Month, Day)
    • Example: Date(2024, 5, 21)
  76. Year:
    • Purpose: Extracts the year from a date/time value.
    • Usage: Year(DateTime)
    • Example: Year(Today())
  77. Month:
    • Purpose: Extracts the month from a date/time value.
    • Usage: Month(DateTime)
    • Example: Month(Today())
  78. Day:
    • Purpose: Extracts the day from a date/time value.
    • Usage: Day(DateTime)
    • Example: Day(Today())
  79. Hour:
    • Purpose: Extracts the hour from a date/time value.
    • Usage: Hour(DateTime)
    • Example: Hour(Now())
  80. Minute:
    • Purpose: Extracts the minute from a date/time value.
    • Usage: Minute(DateTime)
    • Example: Minute(Now())
  81. Second:
    • Purpose: Extracts the second from a date/time value.
    • Usage: Second(DateTime)
    • Example: Second(Now())
  82. Weekday:
    • Purpose: Extracts the day of the week from a date/time value.
    • Usage: Weekday(DateTime)
    • Example: Weekday(Today())
  83. Len:
    • Purpose: Returns the length of a text string.
    • Usage: Len(Text)
    • Example: Len("Hello World")
  84. Left:
    • Purpose: Returns the leftmost part of a text string.
    • Usage: Left(Text, NumberOfCharacters)
    • Example: Left("Hello World", 5)
  85. Right:
    • Purpose: Returns the rightmost part of a text string.
    • Usage: Right(Text, NumberOfCharacters)
    • Example: Right("Hello World", 5)
  86. Mid:
    • Purpose: Returns a middle part of a text string.
    • Usage: Mid(Text, StartIndex, NumberOfCharacters)
    • Example: Mid("Hello World", 6, 5)
  87. Upper:
    • Purpose: Converts a text string to uppercase.
    • Usage: Upper(Text)
    • Example: Upper("Hello World")
  88. Lower:
    • Purpose: Converts a text string to lowercase.
    • Usage: Lower(Text)
    • Example: Lower("Hello World")