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

Is there a "range" function in PowerApps?

Hi all

 

Similar to when I want to edit a whole range of switchports on a switch, is there a way to reference a whole range of sequential fields in PowerApps?

 

In my PowerApp, when the "submit" button is pressed, a check is done to see if loads of TextInput fields has been filled out like...

 

 

If(!TextInput1.Visible Or !TextInput1_1.Visible Or !TextInput1_2.Visible Or !TextInput1_3.Visible Or !TextInput1_4.Visible,
       Notify("Make sure you completed all the checks, then try again", NotificationType.Error), 
SubmitForm(Form1))

 

 

Now, the above example is only for 4 fields but I have 64 of these TextInput fields in my current app, can I reference all TextInput fields in one go, instead of having to mention them all individually? Something like...

 

 

If(RANGE(!TextInput1.Visible - !TextInput1_64.Visible), 
       Notify("Make sure you completed all the checks, then try again", NotificationType.Error), 
SubmitForm(Form1))

 

 

Thanks for reading!

1 ACCEPTED SOLUTION

Accepted Solutions
MiguelOliveira
Microsoft
Microsoft

Hi fnanfne!

Unfortunately, there is not support function or mechanism in a Canvas App to loop components such as Text Inputs.

In Canvas Apps you can find the Sequence() function, however this might not fit your use case since it requests a group of elements and not "one by one".


Kind Regards,

Miguel Oliveira

View solution in original post

2 REPLIES 2
MiguelOliveira
Microsoft
Microsoft

Hi fnanfne!

Unfortunately, there is not support function or mechanism in a Canvas App to loop components such as Text Inputs.

In Canvas Apps you can find the Sequence() function, however this might not fit your use case since it requests a group of elements and not "one by one".


Kind Regards,

Miguel Oliveira

Hey @MiguelOliveira 

 

Great stuff, thanks a bunch for the quick reply.

 

I will just have to manually enter all these fields then, I hope the form or submit function won't suffer from any performance issues as a result of this, fingers crossed.

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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