cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AzJackson
Helper I
Helper I

SMS Feature and Number Field with Decimal

Hi, 

 

I have app which uses the user phone to send an SMS. 

 

When the sms is populated the number fields populates with a decimal and several zeros. 

 

The field the app is looking up from SharePoint does not have decimal in it, it is a whole number filed.

 

I have applied a fix to the app using the "#" format in the app as the app was originally showing decimal places.

 

Is there anyway to remove the decimal and zeros that follow in the sms. 

 

See screenshot attached 

3 ACCEPTED SOLUTIONS

Accepted Solutions

Thank you for the suggestion, however it keeps show as an error in the code

 

The code without your addition is:

Launch("SMS:"& PhoneNumber,"body",   ................................ (various other look ups for the sms  message, using the below format)
& "Total Mileage: " & BrowseGallery.Selected.'# Miles Travelled' & " ")

View solution in original post

I suggest you create a collection OnVisible of the screen:

ClearCollect(MyTableCol,AddColumns( Datasource,"MilesTravelled",
Left ('# Miles Travelled', Find (".",'# Miles Travelled')-1)));
 
Put the collection on the browse Gallery: MyTableCol  
Also change one of the labels inside the Gallery to: ThisItem.MilesTravelled
 
Finally alter your Launch formula to :
Launch("SMS:"& PhoneNumber,"body",   ................................ (various other look ups for the sms  message, using the below format)
& "Total Mileage: " & BrowseGallery.Selected.MilesTravelled & " ")
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 

View solution in original post

A-HJ
Regular Visitor

Thanks, works perfectly 

 

Also found another way to fix it to, as the data is pulling form a SharePoint list i also changed the formula of the SharePoint list to 

=TEXT([Column 1]-[Column 2],"#")

which also works and removes the need for the additional formula in PowerApps, thank you tho

View solution in original post

4 REPLIES 4
eka24
Super User
Super User

Try

Left (Textbox1.Text, Find (".", Textbox1.Text)-1)

 

Replace Textbox1 with yours

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thank you for the suggestion, however it keeps show as an error in the code

 

The code without your addition is:

Launch("SMS:"& PhoneNumber,"body",   ................................ (various other look ups for the sms  message, using the below format)
& "Total Mileage: " & BrowseGallery.Selected.'# Miles Travelled' & " ")

View solution in original post

I suggest you create a collection OnVisible of the screen:

ClearCollect(MyTableCol,AddColumns( Datasource,"MilesTravelled",
Left ('# Miles Travelled', Find (".",'# Miles Travelled')-1)));
 
Put the collection on the browse Gallery: MyTableCol  
Also change one of the labels inside the Gallery to: ThisItem.MilesTravelled
 
Finally alter your Launch formula to :
Launch("SMS:"& PhoneNumber,"body",   ................................ (various other look ups for the sms  message, using the below format)
& "Total Mileage: " & BrowseGallery.Selected.MilesTravelled & " ")
 
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
 

View solution in original post

A-HJ
Regular Visitor

Thanks, works perfectly 

 

Also found another way to fix it to, as the data is pulling form a SharePoint list i also changed the formula of the SharePoint list to 

=TEXT([Column 1]-[Column 2],"#")

which also works and removes the need for the additional formula in PowerApps, thank you tho

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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 (922)