Power Apps has three main types of variables: Global Variables, Context Variables and Collections.
Global Variables can be used anywhere in the app. They are created using the Set() function.
Example:
Set(UserName, "John")
Context Variables are limited to a single screen. They are created using the UpdateContext() function.
Example:
UpdateContext({IsVisible: true})
Collections are table-like variables that can store multiple records and multiple fields. They are created using Collect() or ClearCollect().
Example:
ClearCollect(Products, {Name: "Laptop", Price: 500})
Each type is chosen based on where the data needs to be used and how much information you want to store.


