cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Coopedup
Resolver I
Resolver I

Form field values auto update before submitting

Hi all,

 

I have two fields where the user selects a numerical values via a combox list (source is SharePoint List picklist). A third field has a simple multiplication based on the DataCardValue of the two combo boxes. Based on the numerical value of that third field I want to update a forth field with a text value.  This will then allow me to submit the form and have all four records update. 

 

The forth field is traditionally a combo box too but I can't get the formula to work based on the DataCardValue of the 3rd number value, instead I have to select from source which seems means the save doesn't update the SP List value of the 4th field

 

When trying a simple trial, If(DataCardValue381 < 6, "Low", "Medium"), I get an invalid argument type, expecting a Number value.

 

What am I doing wrong?

 

If(
  Value(ThisItem.'Int Score') < 6,
      (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Low"
    )), 
    If(
    Value(ThisItem.'Int Score') > 9,
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "High"
    ) ), 
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Medium"
    ))))

 

1 ACCEPTED SOLUTION

Accepted Solutions
Coopedup
Resolver I
Resolver I

This is the greatest forum. You post and 6mins later work out the answer. 

 

Value(DataCardValue381.Text)

If(
  Value(DataCardValue381.Text) < 6,
      (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Low"
    )), 
    If(
    Value(DataCardValue381.Text) > 9,
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "High"
    ) ), 
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Medium"
    ))))

 

View solution in original post

2 REPLIES 2
Coopedup
Resolver I
Resolver I

This is the greatest forum. You post and 6mins later work out the answer. 

 

Value(DataCardValue381.Text)

If(
  Value(DataCardValue381.Text) < 6,
      (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Low"
    )), 
    If(
    Value(DataCardValue381.Text) > 9,
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "High"
    ) ), 
    (Filter(
        Choices([@'Register'].'Int Rating'),
        Value = "Medium"
    ))))

 

View solution in original post

RandyHayes
Super User III
Super User III

@Coopedup 

And perhaps even better that a little while later, someone comes along and refactors a bit to reduce your formula typing:

{Value:
    If(Value(DataCardValue381.Text) < 6, "Low",
       Value(DataCardValue381.Text) > 9, "High",
       "Medium"
     )
}

😁 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (78,770)