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
Frequent 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' & " ")

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.
 
A-HJ
Frequent 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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,202)