cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
evac2104
Frequent Visitor

How to create multiple collections in OnVisible action?

Hello, I need to create several collections for my form. So I try to use following code in the screen's OnVisible action:

ClearCollect(AllMand; '[prodev].[Mandanten]');

ClearCollect(AllPortfolio;'[prodev].[Portfolio]');

 

It works when using just one ClearCollect, but with 2 it says "unexpected token". How to create several collections at once?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello, needed to use 2 ;; and no spaces - then it works:

 

ClearCollect(AllMand;'[prodev].[Mandanten]');;ClearCollect(AllPortfolio;'[prodev].[Portfolio]');;ClearCollect(AllLaufzeiten;'[prodev].[Laufzeit]')

 

Thanks,

View solution in original post

3 REPLIES 3
JRaasumaa
Memorable Member
Memorable Member


@evac2104 wrote:

Hello, I need to create several collections for my form. So I try to use following code in the screen's OnVisible action:

ClearCollect(AllMand; '[prodev].[Mandanten]');

ClearCollect(AllPortfolio;'[prodev].[Portfolio]');

 

It works when using just one ClearCollect, but with 2 it says "unexpected token". How to create several collections at once?


 

Remove the final ; from your code and it should work fine.

 

ClearCollect(AllMand; '[prodev].[Mandanten]');
ClearCollect(AllPortfolio;'[prodev].[Portfolio]')

Hello, needed to use 2 ;; and no spaces - then it works:

 

ClearCollect(AllMand;'[prodev].[Mandanten]');;ClearCollect(AllPortfolio;'[prodev].[Portfolio]');;ClearCollect(AllLaufzeiten;'[prodev].[Laufzeit]')

 

Thanks,

View solution in original post


@evac2104 wrote:

Hello, needed to use 2 ;; and no spaces - then it works:

 

ClearCollect(AllMand;'[prodev].[Mandanten]');;ClearCollect(AllPortfolio;'[prodev].[Portfolio]');;ClearCollect(AllLaufzeiten;'[prodev].[Laufzeit]')

 

Thanks,


 

Yes, some languages have 2 ;; required, but the last ; definitely would not work.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,181)