Skip to main content
October 11, 2021
Question

save the value in columns format

  • October 11, 2021
  • 6 replies
  • 0 views

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
    October 11, 2021

    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

    October 11, 2021

    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
    October 11, 2021

    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