DateTimeValue Function
Converter datas é um desafio e ter uma função que faz isso, facilita-nos bastante o trabalho.
A função DateTimeValue faz isso por nós. A função converte uma string num objeto de data e hora.
DateTimeValue("2024-10-01")
retornará:
01-10-2024 00:00Experimentemos utilizar com hora:
DateTimeValue("2024-10-01 16:00")
retornará:
01/10/2024 16:00
How to rotate images in Powerapps
- Create a New Screen :
- In your Power App, go to the “Screens” tab.
- Click on “New Screen” and choose a blank screen template or any other layout that suits your design.
- In New Screen insert image (Ex.:”image1″)
- In New screen Insert Icon “Reload” (Ex. “iconrotate”)
- On New screen property “On Visible”, set it:
- Set(iRotate,0);Set(stRotate,“ImageRotation.None”);
- On image “image1” property “ImageRotation”, set:
- stRotate
- On icon “iconrotate” property “OnSelect”, set:
- If(iRotate < 3,Set(iRotate,iRotate + 1),Set(iRotate,0));Switch(iRotate,1,Set(stRotate,“rotate90”),2,Set(stRotate,“rotate180”),3,Set(stRotate,“rotate270”),Set(stRotate,“ImageRotation.None”))
Create a Popup message box in Powerapp Canva
Create a popup message box
- Create a New Screen :
- In your Power App, go to the “Screens” tab.
- Click on “New Screen” and choose a blank screen template or any other layout that suits your design.
- Design the Popup :
- On the new screen, design your popup box. You can use container and add labels, buttons, input controls, or any other elements you need for your popup’s content.
- Create a Button or Trigger to Show the Popup :
- On the screen (or wherever you want to trigger the popup), create a button or control (eg, an icon).
- In the “OnSelect” property of the button, set it to navigate to the popup screen and make it visible:
- Set(PopupVisible, true);
- Create a Close Button:
- On the popup screen, create a close button (e.g., an “X” icon or a “Close” button).
- In the “OnSelect” property of the close button, set it to navigate back to the previous screen and hide the popup:
- Set(PopupVisible, false);
- Use a Variable for Visibility:
- Create a variable to control the visibility of the popup. In the app’s OnStart or OnVisible property, initialize the variable:
- Set(PopupVisible, false);
- Create a variable to control the visibility of the popup. In the app’s OnStart or OnVisible property, initialize the variable:
- Set the “Visible” property of the popup screen to the value of the variable:
- PopupVisible
- Set the “Visible” property of the popup screen to the value of the variable:
Test Your Popup:
- Preview or publish your Power App and test the popup functionality.
Collecting large lists in PowerApps from SharePoint
Collecting large lists in PowerApps from SharePoint
// — Process Start —
// — Clear all collections —
Clear(colDummy);
Clear(colIterations);
Clear(colNumbersTable);
Clear(cCollection); // — Collection where store all Sharepoint records
/*****************************************************************************************
Start generate records series
List up to 2 million records, if necessary increases the value of the records in the vectors
*******************************************************************************************************/
ClearCollect(
colNumTemp,
[
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
]
);
ForAll(
colNumTemp,
ForAll(
colNumTemp,
ForAll(
colNumTemp,
Collect(
colDummy,
{dummy: 1}
);
Collect(
colNumbersTable,
{Number: CountRows(colDummy)}
)
)
)
);
// — Series end
// — Get the first and last record of the list
UpdateContext(
{
FirstRecord: First(
Sort(
sharepointList, //— Sharepoint list to go find the records
ID,
Ascending
)
)
}
);
UpdateContext(
{
LastRecord: First(
Sort(
sharepointList, //— Sharepoint list to go find the records
ID,
Descending
)
)
}
);
// —The capture of records begins
UpdateContext(
{
Iterations: RoundUp(
(LastRecord.ID – FirstRecord.ID) / 2000,
0
)
}
);
// —Create a new collection to register the first ID found
ClearCollect(
varCounter,
{min_Num: FirstRecord.ID}
);
/*****************************************************************************************
A ForAll loop is used where the column number is less than or equal to the number of iterations
Updates the iteration collection with the current iteration number, minimum and maximum numbers
update the collection of counters
********************************************************************************************************/
ForAll(
Filter(
colNumbersTable,
Number <= Iterations
),
Collect(
colIterations,
{
Number: Last(
FirstN(
colNumbersTable,
CountRows(colIterations) + 1
)
).Number,
min_Num: First(varCounter).min_Num,
max_Num: First(varCounter).min_Num + 1999
}
);
Patch(
varCounter,
First(varCounter),
{
min_Num: Last(
FirstN(
colIterations,
CountRows(colIterations) + 1
)
).max_Num + 1
}
)
);
// End of capture of records
/*************************************************************************************
Finally, with a ForAll loop we will collect all our items
** !! Unable to use the ID column to make delegations !! **
** The ID here must be a numeric field (numID)**
****************************************************************************************************/
ForAll(
colIterations,
Collect(
sharepointList, //— Sharepoint list to go find the records
Filter(
sharepointList, //— Sharepoint list to go find the records
numID >= min_Num && numID <= max_Num
)
)
);
// Downloads collections
// — END —
Search
Artigos Recentes
- Missão Backup
- Constroi o Computador
- Jardim dos Números
- EuroVault360 | Gestão Financeira Inteligente
- Aprender formas nunca foi tão divertido!
- Home
- Cansado de formulários em PDF? Crie uma app simples com Power Apps
- Comparar dois ficheiros HTML no Power Automate
- Como Criar E-mails Automáticos de Aniversário no Power Automate
- Guia Prático: Espelhar Todas as Listas do SharePoint com Power Automate