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

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 II
Resolver II

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 II
Resolver II

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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