How to update a Geohash property through AIP Logic

I am currently working in AIP Logic and attempting to create an Action that updates the Geohash property of an Ontology Object. I’ve encountered a limitation where ‘User Input’ isn’t available as an option when trying to directly modify a Geohash property. I also tried creating an Action with separate double inputs for longitude and latitude, hoping to then define the “rules” to generate and set the Geohash. But I am unable to modify the rules script…

Has anyone successfully updated a Geohash property via an AIP Logic Action? Any insights or alternative approaches would be greatly appreciated!

1 Like

How come? This definitely sounds like it should be possible and iirc I have done this before, or something similar at least. Do you get an error when you try to edit the action script?

1 Like

Do you need to set the geohash directly in the object property? Maybe if this isn’t working you could only keep lat/lon in your ontology then create a function to compute the geohash from lat/lon for your object type, then in your application just get the geohash by calling the function, e.g. a function backed column or action? I think this might be better especially if you need to update locations regularly though I have no idea what your usecase is.

See function backed variables here: https://www.palantir.com/docs/foundry/workshop/functions-use

Some relevant stuff here too:
https://www.palantir.com/docs/foundry/functions/use-functions

Thanks for the suggestion! I only need to modify these properties once, as they’re just for displaying the objects on a map within my Workshop application. Also, regarding function-backed variables, I’m aware of them, but the available types in the TypeScript functions module are limited to (boolean, string, Integer, Long, Float, Double, LocalDate, Timestamp), as stated in the documentation here https://www.palantir.com/docs/foundry/functions/use-functions

No error message pops up or anything, it’s just that the text box where I’m supposed to write the script doesn’t allow any input at all. It’s like the field is non-interactive.

You need to delete the default action with the bin icon and add a function one: