cancel
Showing results for
Did you mean:
New Member

## With function within Label not responding to inputs

Hey everyone,

I am having some trouble with the With function (placed within a Label) for a test app I am creating. The label is supposed to show monthly car payments based on r: interest rate (inputted from a slider), p: car price (inputted from another label), and y: number of years (inputted from a slider). My formula is as follows:

With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice, y:Slider_YearsSlider, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))

The formula and function seems fine, but the issue I am having is that the label does not update when I change p: car price (from its respective label), or y: number of years (from it's respective slider). When I adjust r: interest rate from it's respective slider, the label updates values live to show the new monthly payment, however when I change p or y, the label does not change. The label will however update if I remove and reinsert "p:Label_TotalPrice" or "y:Slider_YearsSlider" from the With formula, but that is not convenient.

Does anyone have any guidance to fix this so that adjusting either variables will result in the label to update values live?

1 ACCEPTED SOLUTION

Accepted Solutions
New Member

Nevermind, resolved.

Multiplying each component in the With function by 1 fixed the issue.
With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice*1, y:Slider_YearsSlider*1, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))

2 REPLIES 2
New Member

Nevermind, resolved.

Multiplying each component in the With function by 1 fixed the issue.
With( {r:Slider_RateSlider/8/100, p:Label_TotalPrice*1, y:Slider_YearsSlider*1, n:12}, (p*(r/n))/(1-(1+r/n)^(-n*y)))

Super User

I have not seen this before. You could try setting the label to a variable. Then have a Set statement in the OnChange of the other inputs that has your With statement. That should force things to change when any input changes.

Not very elegant, but it should work

Announcements

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 Community Call

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

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

#### 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 (3,498)