How To Show the latlong Column IN Format Rules

i have a latlong column [Second Start Point]=12.333,19.233,,,,,,.......some value 0...

 

i have to create format rules on showing [Second Start Point]=0.....

this is the condition..

How To Show the latlong Column IN Format Rules? any one please clarify

Solved Solved
0 2 70
  • UX
1 ACCEPTED SOLUTION

I assume what you are asking is how do you detect when a LatLong is "0" so you can apply a Format Rule to it?

LatLong values are a comma separated pair of decimal values.  The values in AppSheet support, I believe, 6 decimal places. So, when it is "0",  it should be reflected as (0.000000, 0.000000) 

So, I think you should be able to use in your Format Rule an expression like this:

EDITED:  I played with this and you do not need parenthesis

[Second Start Point]= "(0.000000, 0.000000)"

[Second Start Point] = "0.000000, 0.000000"

EDITED:  As I was playing with this, I've realized that a LatLong column does not show its value directly in a column.  It either shows an inline action or if that action is disabled, nothing at all.

In order to show a formatted LatLong value, you will need to create another column as Text and assign it with the expression TEXT([Second Start Point]).  Then in your format rule, test for a "0" as shown above but apply the formatting to the second Text column.

Assignment of Location Text column from LatLong column

Screen Shot 2022-06-01 at 7.59.08 AM.png

Application of format rule to Location column

Screen Shot 2022-06-01 at 7.55.35 AM.png

Result of implementation described above.

Screen Shot 2022-06-01 at 8.01.09 AM.png

View solution in original post

2 REPLIES 2

I assume what you are asking is how do you detect when a LatLong is "0" so you can apply a Format Rule to it?

LatLong values are a comma separated pair of decimal values.  The values in AppSheet support, I believe, 6 decimal places. So, when it is "0",  it should be reflected as (0.000000, 0.000000) 

So, I think you should be able to use in your Format Rule an expression like this:

EDITED:  I played with this and you do not need parenthesis

[Second Start Point]= "(0.000000, 0.000000)"

[Second Start Point] = "0.000000, 0.000000"

EDITED:  As I was playing with this, I've realized that a LatLong column does not show its value directly in a column.  It either shows an inline action or if that action is disabled, nothing at all.

In order to show a formatted LatLong value, you will need to create another column as Text and assign it with the expression TEXT([Second Start Point]).  Then in your format rule, test for a "0" as shown above but apply the formatting to the second Text column.

Assignment of Location Text column from LatLong column

Screen Shot 2022-06-01 at 7.59.08 AM.png

Application of format rule to Location column

Screen Shot 2022-06-01 at 7.55.35 AM.png

Result of implementation described above.

Screen Shot 2022-06-01 at 8.01.09 AM.png

Steve
Platinum 4
Platinum 4
Top Labels in this Space