# GPS Location (update device state)

**URL:** <https://forums.losant.com/t/gps-location-update-device-state/843>\
**Category:** Help\
**Created:** [March 31, 2018, 10:42am UTC](https://forums.losant.com/t/gps-location-update-device-state/843 "2018-03-31T10:42:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul\_wareham](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@paul\_wareham](https://forums.losant.com/u/paul_wareham)\
**Post date:** [March 31, 2018, 10:42am UTC](https://forums.losant.com/t/gps-location-update-device-state/843/1 "2018-03-31T10:42:30Z")

</div>

Hi Folks,

I have GPS location in my payload in the form of two separate numbers for lat and long. data.message.longitude and data.message.latitude.

I understand that I need to combine them into a GPS string.

Can I do that directly in the “value” column Device State Update node? Any example?

Thanks!

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [March 31, 2018, 11:24am UTC](https://forums.losant.com/t/gps-location-update-device-state/843/2 "2018-03-31T11:24:57Z")

</div>

Easy peasy. When setting individual fields for state values in the [Device State Node](https://docs.losant.com/workflows/outputs/device-state/#configuration), you can use [string templates](https://docs.losant.com/workflows/accessing-payload-data/#string-templates) for each value.

String templates can be combined with other string templates or static characters; therefore, since we allow GPS attributes to be set in the format of `latitude,longitude`, you’ll set the value of your GPS attribute to be:

```auto
{{data.message.latitude}},{{data.message.longitude}}

```

Let us know if you have any other questions!
