Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Value function converted an empty text to a blank value


I have the same issue here and provide my code below that appears to be creating the issue. Does anyone have anything thoughts as i cannot fix my issue with the above idea:


@Bug @warning

Power Apps
Power Apps

The Value function (and its similar type conversion functions: ColorValue, DateValue, DateTimeValue, TimeValue) will return a blank value if its input is blank - or if it is an empty string. I can't read your code (it's too small), so I can't tell exactly what you are trying to do.

The post at Power Fx: Experimental error handling update | Microsoft Power Apps has more details about this behavior.

Frequent Visitor

@CarlosFigueira  This is the code below - Sorry for the poor screen shot - 

Search(Filter(SearchDateRange,FormID = Value(txtQAFormIDSearch.Text) Or txtQAFormIDSearch.Text="",AgentPersonNumber = cboAgentSearch.Selected.PersonNumber Or IsBlank(cboAgentSearch.Selected.PersonNumber),QualityCoachName = cboQACoachSearch.Selected.QualityCoachName Or IsBlank(cboQACoachSearch.Selected.QualityCoachName)),txtPolicyReferenceSearch.Text,"CallReference","PolicyReference")

If you don't want to see that warning (I'm guessing you see it on the monitor), you can switch the order of the first condition for the Filter expression (see below). The Or operator can "short-circuit" the evaluation: if the first operand is true, then it will not evaluate the other operands, so in this case it will not call the Value function with an empty value.

        FormID = IsBlank(txtQAFormIDSearch.Text) Or Value(txtQAFormIDSearch.Text),
        AgentPersonNumber = cboAgentSearch.Selected.PersonNumber Or IsBlank(cboAgentSearch.Selected.PersonNumber),
        QualityCoachName = cboQACoachSearch.Selected.QualityCoachName Or IsBlank(cboQACoachSearch.Selected.QualityCoachName)

Hope this helps!

Helpful resources

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

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

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.


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 Kudoed Authors
Users online (2,307)