Home > Back-end >  Lotus Domino data as JSON - Propertie Names
Lotus Domino data as JSON - Propertie Names

Time:08-30

I have created a custom view in my Notes database. The view has its own column headers. Now when I get the JSON output, the object looks like this.

"@href":"\yourdatabase.nsf\/api\/data\/collections\/name\/MYVIEW\/unid\/FF235B724095ADDAC12585F300453467",
"@link":
{
  "rel":"document",
  "href":"\yourdatabase.nsf\/api\/data\/documents\/unid\/FF235B724095ADDAC12585F300453467"
},
"@entryid":"1-FF235B724095ADDAC12585F300453467",
"@unid":"FF235B724095ADDAC12585F300453467",
"@noteid":"1B752",
"@position":"1",
"@read":true,
"@siblings":761,
"@form":"Person",
"eName":"Doe",
"eNAM_D":"John",
"eAddress":"Mr.",

I had thought that the property names come from the column headings. as an example:

"Name":"Doe",
"Forename":"John",
"Address":"Mr.",

instead of

"eName":"Doe",
"eNAM_D":"John",
"eAddress":"Mr.",

Is there a way to set the properties yourself?

CodePudding user response:

The name used as the property name is the programmatic name of the column (check the last tab on the column properties dialog box).

This is usually the field name if the column shows just a field. It is a computed unique name e.g. $21 if the column shows something other than a field.

You can change the name of a column that does not show only a field.

In your case, you are showing a field called eName and the programmatic name is eName. You can't change this.

You can however change the column to be a computed value that isn't just a field e.g. "" eName and then change the programmatic name. Do not change the programmatic name to the name of another field in the database.

  • Related