
Announcements
hi, i'm making a game app.
for the app i need to store some numbers inside a collection. how should i use it correctly?
i need to create an empty collection at the app start and then on the click of a button i need to add a value to a collection.
on start i did
ClearCollect(MyColl,0);on the button onSelect i get the value from a textbox
Collect(MyColl,Right(MyTextField.Text,2));
i have two issues:
1) the collection start with a 0 instead of just being initialized and stay empty
2) the onSelect gives me an error because it says it require a record
how to fix?
First problem:
Clear(MyColl);
This formula will delete ALL items in your collection.
Second problem:
Collect(
MyColl,
{
MyField: Right(MyTextField.Text,2)
}
);
https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-left-mid-right
If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!
Best regards,
Gonçalo Nogueira
Check my LinkedIn!
My website!
My blog!