web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Value function convert...
Power Apps
Unanswered

Value function converted an empty text to a blank value

(0) ShareShare
ReportReport
Posted on by 261

HI,

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:

JasonLane_0-1647865036932.png

@Bug @Anonymous

Categories:
I have the same question (0)
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    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.

  • JasonLane Profile Picture
    261 on at

    @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")

  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    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.

    Search(
     Filter(
     SearchDateRange,
     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)
     ),
     txtPolicyReferenceSearch.Text,
     "CallReference",
     "PolicyReference"
    )

    Hope this helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard