cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

How to create a collection with a single column table?

I'm trying to create a collection named "TodosPeriodos with the following code, in the OnVisible of a screen:

 

ClearCollect(
    TodosPeriodos;
    Table(
        {MonthYear: "Jan-2020"};
        {MonthYear: "Fev-2020"};
        {MonthYear: "Mar-2020"};
        {MonthYear: "Abr-2020"};
        {MonthYear: "Jun-2020"};
        {MonthYear: "Jul-2020"};
        {MonthYear: "Ago-2020"};
        {MonthYear: "Set-2020"};
        {MonthYear: "Out-2020"};
        {MonthYear: "Nov-2020"};
        {MonthYear: "Dez-2020"}
    )
)

 

However, this is what I get when I show the screen:

Anotação 2020-05-01 1818172.jpg

 

I also tried this code on "OnStart" of the app, and also tried this code here:

 

Set(
    Temp;
    Table(
        {MonthYear: "Jan-2020"};
        {MonthYear: "Fev-2020"};
        {MonthYear: "Mar-2020"};
        {MonthYear: "Abr-2020"};
        {MonthYear: "Jun-2020"};
        {MonthYear: "Jul-2020"};
        {MonthYear: "Ago-2020"};
        {MonthYear: "Set-2020"};
        {MonthYear: "Out-2020"};
        {MonthYear: "Nov-2020"};
        {MonthYear: "Dez-2020"}
    )
);;
ClearCollect(
    TodosPeriodos;
    Temp
)
1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User II
Dual Super User II

Hi @WebPortal 

 

Make sure to run app onstart when in edit mode of App.

Righ click on App Node and select Run OnStart

 

image.png

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

View solution in original post

1 REPLY 1
Dual Super User II
Dual Super User II

Hi @WebPortal 

 

Make sure to run app onstart when in edit mode of App.

Righ click on App Node and select Run OnStart

 

image.png

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks,
Reza Dorrani, MVP
YouTube
Twitter

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (70,334)