Accessing an object stored in a doc


(Alex) #1

I'm trying to use a scripting field to truncate a particular field that's stored.

Unfortunately, when i try to access this field in the scripting fields section, it returns the error "No field found for [field_name] in mapping with types.

I can access other values of the doc by doing:
doc['event_id'].value

But i want to access a field which is user_data.FilePath

So attempting:
doc['user_data.FilePath'].value or even just doc['user_data'].value throws the same error as above.

Anyone point me in the right direction? Docs on painless scripting and some areas are a little light :slight_smile:


(Suhas) #2

Hi Alex,

Could you please share a screenshot of the structure of the doc?


(Alex) #3

Doc structure:

Discover view:


(Alex) #4

I don't know what i stuffed up originally in the scripted field, but i can access it now as normal using doc['user_data.FilePath'].value

Thanks anyway/


(Suhas) #5

Glad to hear that.

Cheers :+1:


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.