Forum Discussion

rajat09's avatar
rajat09
Copper Contributor
Apr 28, 2021

Update lookup table values through Rest api

I am trying to create new entry in lookup table using Rest but getting an error.


ERROR : An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
clientRequestId: af31b745-2214-4635-9a45-0fa1311e7d2c
serviceRequestId: aea3c29f-30ba-b000-fc46-67eccb973d3b


Using Post message : 

URI:

_api/ProjectServer/LookupTables('00008e67-65a3-4898-baaa-d82d995bbb02')/Entries/Add

 

Body 

{'parameters':{

'Value':'110',
'Description':'Added from Flow',
'SortIndex':'7',
'ParentId':'dd67bf95-85a3-eb11-bfa0-00155dc0a600'
}}
Using following References https://docs.microsoft.com/en-us/previous-versions/office/project-javascript-api/jj668218(v=office.15)

https://docs.microsoft.com/en-us/previous-versions/office/project-javascript-api/jj668483(v=office.15) 
 

  • Ariwibawa's avatar
    Ariwibawa
    Copper Contributor

    rajat09 

     

    the primitive value error was coming from Value, it is expected an object and not string. You can try using this 

    "Value":{"DateValue":"@{utcNow()}""DurationValue":null,"NumberValue":"0","TextValue":"Value"}

Resources