Discussions related to integration with SoftPro Standard or SoftPro Enterprise editions.
- Posts: 17
- Joined: Wed Aug 16, 2017 5:33 pm
Making a call to SPGetFieldValue passing "" or even "nonsense" for chFieldName parameter returns 0 as the result. According to the documentation it should return a result < 0. Has this changed and not been updated in the documentation? Is there a way to know if a field name is invalid compared to a valid one that has an empty string as the value?
- Posts: 14
- Joined: Mon Oct 06, 2008 9:29 am
The documentation is wrong for that function. SPGetFieldValue returns the length of the data in the field. If you pass in a bad field name it will return zero. I'll put a bug in to get that fixed so that the API returns < 0 value for a bad field name.
SPSetFieldValue (on the other hand) will return an error if you pass in a bad field name.You will get a -104 error code in that scenario.
SoftPro Software Engineer