cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vlm_mv
Advocate I
Advocate I

create a collection of forms

I would like to create a button, that can flexible submit a couple of forms.

Like:

 

ForAll(CurrentForms,SubmitForm(Value))

 

Where CurrentForms supposed to be a collection of Form objects.

What I cannot figure out, how to create this collection.

It turns out that while I can create collections of other objects, the standard approach does not work with forms:

 

ClearCollect(test, ["",""]); //OK

ClearCollect(screens, [Screen1, Screen2]); // OK

ClearCollect(forms, [Form1,Form2]);  //Not OK

ClearCollect(forms, [Form1,Form1]);  //OK: I can put the same form to the array

ClearCollect(inputbox, [TextInput1, TextInput2]);  //OK

ClearCollect (objTest, {ID:1, Name: "A"},{ID:2, Name: "2"}); // OK

ClearCollect (objForms, {ID:1, Name: "A", Form: Form1},{ID:2, Name: "2", Form: Form2}) //Not OK

 

I tried with screens and text boxes, they work fine, but as long as I put 2 different forms to the collection, the function fails with type error.

 

 

 

 

 

1 REPLY 1
CNT
Super User
Super User

Hi @vlm_mv To the best of my knowledge this will not work. You will get an "the given types are incompatible" error. 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,740)