cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Select Function not firing

I have a form with two date fields and when they are set they calculate the difference between the two values..

This works by having a formula in the OnSelect of DateValue1 and calling this when DateValue2 either changes (OnChange), or selected (OnSelect).. the formula for both is Select(DateValue1).

I have used this in the past without issue; however this seems to have stopped working and I have to manually click back into DateValue1 to make the OnSelect formula fire...

Has there been an update to prevent this.. I even added some notify() alerts to see if the calling DateValue control was firing.

I also added a button to call the DateValue1 control via Select(DateValue1) and when I click it I am getting an error stating that the "The Parameter to this function must be a control with OnSelect property on the same screen" .. which it is
Update - Just to let everyone know this is currently working in APP version 3.19062.18 , and not working in 3.19071.14

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

As a really awful "HACK" I have managed to get this working.. I was inspired by the post https://powerusers.microsoft.com/t5/General-Discussion/SubmitForm-function-can-only-work-on-a-form-W...

I copied DateValue1 & DateValue2 controls out of the form and positioned them in the same X,Y location.. I then set the original controls to get their values from DateValue1_1 & DateValue2_1 accordingly and removed the OnSelect / OnChange from these two controls and then made the formula point to the new controls.. everything now works.. but I am not happy with this..

As mentioned in my UPDATE earlier this is still working in an existing version of an app with a prior version without all this jiggery / smoke and mirrors..

View solution in original post

3 REPLIES 3
v-monli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Is DateValue1 and the control that fires the Select function in the same screen? Please make sure that they need to be on the same screen. 

 

According to the documentation of Select function here:

Select can't cross the boundaries of container controls, such as a gallery or a form. Controls within a container control can only be the subject of a Select function in formulas that are inside the same container control. You can't use Select across screens.

 

If this is not the cause, then I just tested the similar configuration and I cannot reproduce your issue.

 

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-monli-msft 

 

Hi thanks for the reply, I had read that but was unsure where the control boundry is /was. The two date fields are in a the same Form, and are on the same screen.

The button was on the same screen, but not on the same form; so is the form is the boundry then I guess it will not work.

I then copied the button into both DataCards (see image) so now the button is within the same screen / form and DataCard - but the Select of DateValue1 is still not triggered when I click the button. However, I do not now get the other error message after clicking the button.

I still think that there is an underlying issue with Select not being called

 

Regards,

 

Andrew

Anonymous
Not applicable

As a really awful "HACK" I have managed to get this working.. I was inspired by the post https://powerusers.microsoft.com/t5/General-Discussion/SubmitForm-function-can-only-work-on-a-form-W...

I copied DateValue1 & DateValue2 controls out of the form and positioned them in the same X,Y location.. I then set the original controls to get their values from DateValue1_1 & DateValue2_1 accordingly and removed the OnSelect / OnChange from these two controls and then made the formula point to the new controls.. everything now works.. but I am not happy with this..

As mentioned in my UPDATE earlier this is still working in an existing version of an app with a prior version without all this jiggery / smoke and mirrors..

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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
Users online (2,154)