Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Power Apps canvas - convert numeric value in a collection to an empty string

Posted on by 119
Hello -
 
I would like to convert the value in field Promotional Price to an empty string or blank when applying this UpdateIf statement to the collection.
I've attempted many different things but only putting a zero in the statement does anything close.
 
Any suggestions?
 
UpdateIf(ColStorePriceswithPromoDescrip,'Promotion Type'="Retail Exception",{'Promotional Price':0});
 
 
 
 
 
Categories:
  • Cgangweg01 Profile Picture
    Cgangweg01 119 on at
    Power Apps canvas - convert numeric value in a collection to an empty string
    Thank you timl!
     
    I think I tried that but must have had the syntax wrong.
    Worked like a charm now!
    Appreciate your help.
  • Verified answer
    timl Profile Picture
    timl 31,980 on at
    Power Apps canvas - convert numeric value in a collection to an empty string
    Hi  Cgangweg01 
     
    I assume you tried the following and it didn't work? That's interesting because Blank() should insert a NULL into the field.
     
    If you run the following and check the collection in the collections section of the designer, what value appears against the 'Retail Exception' rows? It could be that the values are being updated to NULL in the collection but are not displayed correctly in the gallery/data table, possibly due to formula that formats the value to 2 decimal places.  
     
    UpdateIf(ColStorePriceswithPromoDescrip,'Promotion Type'="Retail Exception",{'Promotional Price':Blank()});
     
     
     
  • Cgangweg01 Profile Picture
    Cgangweg01 119 on at
    Power Apps canvas - convert numeric value in a collection to an empty string
    Thanks for the reply @ronaldwalcott!
     
    I will try the new column approach. I don't know what a display option is nor how to work that into the button OnSelect statement where the clearcollect and updateif statements are.
  • Suggested answer
    ronaldwalcott Profile Picture
    ronaldwalcott 1,026 on at
    Power Apps canvas - convert numeric value in a collection to an empty string
    Blank is not a valid numeric value.
     
    You could create a new column and convert the number to text or wherever you are displaying the value change the display option to something like
     
    If(ThisItem.NumericField = 0, "", Text(ThisItem.NumericField, "[$-en-US]#,###.##"))
     
     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard