Skip to main content
Inspiring
Oct 11, 2021 1:37 PM UTC
Question

save the value in columns format

Hi,

I have a requirement to save the value in the columns format into the field locationName(ri!location.locationName).Example: lat:56.98786, longitude:8.09933,In the given below format i used the anytype i got the as i required but when i am unable to do with the CDT  , Can u please suggest me any way or is it possible to do in that format

    6 replies

    danny.verb
    Employee
    Oct 11, 2021 2:44 PM UTC

    You can do two things: Create one column for latitude and one for longitude, or, you can save the data as JSON.

    If you have a field 'locationName' that is text, you can save a dictionary to that field by doing a!toJSON(). When you read from that table, you just need to use a!fromJSON() to manipulate those values in SAIL

    Inspiring
    Oct 11, 2021 2:58 PM UTC

    thank you danny.verb, i am getting an error when i am doing as you suggested, here i am saving the latitude and longitude  in ri!locationlistTable.locationName and using the a!toJSON

    mikes0011
    Brainy
    Oct 11, 2021 3:01 PM UTC

    Why are you trying to call a!toJson on just the location name?  It's intended to be called on dictionaries or arrays, as the error message notes.

    The Expression Guru