Hi,
I want to get a field called for instance 'name' in certain document using a key, the view is already sorted using that key and both the key and the field I want are indexed and I am using this formula wich does not return any value but doesn't return an error either
key = plominoContext.field1
db=plominoDocument.getParentDatabase()
view=db.getView("allDocs")
for d in view.getDocumentsByKey(key):
name=d.name
return name
I checked the view and the document exists and the field 'name' has a value too. But I cannot figure out what could it because I have the same formula in another database an works fine.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I want to get a field called for instance 'name' in certain document using a key, the view is already sorted using that key and both the key and the field I want are indexed and I am using this formula wich does not return any value but doesn't return an error either
I checked the view and the document exists and the field 'name' has a value too. But I cannot figure out what could it because I have the same formula in another database an works fine.
Thanks.
Note: Please use GitHub now https://github.com/plomino/Plomino/issues
you have indented the return line, so your loop stops at the first doc