Collections: Collections are special types of variables or data storage mechanism which can be used to manipulate the data within Power Apps.
Collections are usually a group of similar items which acts like a table of values with columns and rows.
We can create, update, delete, use it as the data source for a gallery to view the items within Power App.
Collect, Clear, and ClearCollect functions:
Collect: In Power Apps, the Collect function is used to create or update a collection in your app.
Collections are temporary data sources that allow you to store and work with data within your app.
The Collect function is versatile and can be used in various scenarios to add, modify, or remove records from a collection.
Syntax: Collect( IceCream, { Flavor: "Pistachio", Quantity: 40 }, { Flavor: "Orange", Quantity: 200 } )
Adds two records to the IceCream collection that includes a quantity of pistachio and orange ice cream.
Clear: In Power Apps, the Clear function is used to remove all records from a collection, reset the contents of a control, or clear the input from an input field. Its primary purpose is to clear data or reset the state of elements within your app.
Syntax: Clear( IceCream )
Removes all records from the IceCream collection.
ClearCollect: The ClearCollect function deletes all the records from a collection. And then adds a different set of records to the same collection. With a single function, ClearCollect offers the combination of Clear and then Collect.
Syntax: ClearCollect( IceCream, { Flavor: "Strawberry", Quantity: 300 } )
Clears all data from the IceCream collection and then adds a record that includes a quantity of strawberry ice cream.
Launch: Launches a webpage or a canvas app.
Syntax: Launch( " https://www.google.com/" )
Navigate: In Power Apps, the Navigate function is used to navigate between screens within an app. It allows you to programmatically control the flow of the user interface by directing users to different screens based on specific conditions or events.
Syntax: Navigate( Screen [, Transition [, UpdateContextRecord ] ] )
Screen - Required. The screen to display. In place of Screen, you can also use a control that is on the screen you wish to navigate to.
Transition - Optional. The visual transition to use between the current screen and the next screen. See the list of valid values for this argument earlier in this article. The default value is None.
UpdateContextRecord - Optional. A record that contains the name of at least one column and a value for each column. This record updates the context variables of the new screen as if passed to the UpdateContext function.
Back: In Power Apps, the Back function is used to navigate back to the previous screen in the app.
Syntax: Back( [ Transition ] )
Transition - Optional. The visual transition to use between the current screen and the previous screen. Refer to the list of valid values for this argument earlier in this article. By default, the transition through which a screen returns is the inverse of the transition through which it appeared.
Have a great time using these functions in powerapps.!
Please support by following me on my LinkedIn profile:


Comments
Post a Comment