cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Racheli
Helper V
Helper V

Calculate text input +drop down

Hey There,

I would like to have a label that shows the SUM of a numbers and an inches fraction.

For example: 3+15/16=3.9375

So, for that I have a text input (format number) and drop down for the inches fractions with value-value.

BUT... I can't get to sum them together.

I tried to use Value() but it didn't work.

Thanks in advance 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

OK @Racheli ,

You ideally need to understand what I have done here as you have chosen a rather difficult way of doing what you need

Value(WidIn.Text) + 
With(
   {
      vFract: 
      Find(
         "/",
         WidFrc.Selected.Value
      ),
      vString: WidFrc.Selected.Value
   },
   Value(
      Left(
         vString,
         vFract - 1
      )
   ) / 
   Value(
      Right(
         vString,
         Len(vString) - vFract
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User III
Super User III

Hi @Racheli ,

Assuming you have two drop-downs for 15 and 16, you would use something like (using your control name

Value(YourWholeNumber.Text) + (Value(YourFirstFraction.Selected.Value)/Value(Your2ndFraction.Selected.Value))

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

@WarrenBelz, thanks for your reply, but I have one drop down for the fractions.

I added 2 pic.

Capture shows the drop down

Capture1 shows the formula and the error I suppose.

 

OK @Racheli ,

You ideally need to understand what I have done here as you have chosen a rather difficult way of doing what you need

Value(WidIn.Text) + 
With(
   {
      vFract: 
      Find(
         "/",
         WidFrc.Selected.Value
      ),
      vString: WidFrc.Selected.Value
   },
   Value(
      Left(
         vString,
         vFract - 1
      )
   ) / 
   Value(
      Right(
         vString,
         Len(vString) - vFract
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

I'll be glad to know if there is an easier way.

Thanks

It worked perfectly!!!!

@Racheli ,

I would not have spent 10-15 minutes building a model to test this if there was. You have a text string that you have to "pull apart" to get the two values. The With() statement I used simply saved a whole heap of repetitive code.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,250)