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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Canvas App Substitute ...
Power Apps
Answered

Canvas App Substitute , by .

(0) ShareShare
ReportReport
Posted on by 518 Moderator
Hello,
i have a simple Textbox (classic control, no number input) named txt_akt_stunden_1.
 
I just want to substitute a , by a .
To test it i have a button that does the following "onselect":
Notify(Substitute(txt_akt_stunden_1.Value,",","."));
 
Anyway if there is 1,2 in the textbox
The substitute gives me 12 and not 1.2.
 
Also if i just notify about txt_akt_stunden_1.Value it already gives me 12.
It seems to treat it as number
But in the properties the value is 1,2
 
And to my knowledge Value(txt_akt_stunden_1.Value) should give the value?
And txt_akt_stunden_1.Value should give the text in Textbox?
 
How can i get the real text.

The reason i want to do this is that i want to save the value as the number 1.2 independent if the user uses 1,2 or 1.2 and browser settings
Any help is welcome
Categories:
I have the same question (0)
  • SLMR Profile Picture
    518 Moderator on at
    thanks a lot !!!
    That does the trick.
     
  • Verified answer
    WarrenBelz Profile Picture
    153,477 Most Valuable Professional on at
    OK @SLMR,
    It is always good to provide that information as it will affect who may possibly respond. I do not use Model-Driven Apps, so cannot test anything other than to note that your code should work. You can try this, however that is the extent of what I can contribute
    With(
       {
          _msg:
          Substitute(
             txt_akt_stunden_1.Value,
             ",",
             "."
          )
       },
       Notify(
          _msg,
          NotificationType.Information
       )
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • SLMR Profile Picture
    518 Moderator on at
    thank for your quick response.

    I forgot to mention:
    It is a canvas App but it is a custom page in a model-driven app.
    For some reasons the textboxes have other properties as in a "normal" canvas app.
    So the property Text is not there. I can only use the property Value
  • Suggested answer
    WarrenBelz Profile Picture
    153,477 Most Valuable Professional on at
    Hi @SLMR
    If that is a Classic Control, you need .Text, not .Value
    Notify(
       Substitute(
          txt_akt_stunden_1.Text,
          ",",
          "."
       )
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 403

#2
WarrenBelz Profile Picture

WarrenBelz 338 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 320 Super User 2025 Season 2

Last 30 days Overall leaderboard