Symptom
- You defined custom Adhoc report via Adhoc Report Builder in SuccessFactors UI
- The report is exposed as SFAPI Adhoc Report entity with naming convention AdhocReport_<Report Id> in SFAPI Data Dictionary
- You want to use a field of an SFAPI Adhoc Report entity as a filter in CONSTRAIN BY clause of a SFQL statement in the query for the entity and need to find out if the field is constrainable
Environment
SuccessFactors BizX
Resolution
- Constrainable property cannot be found in SFAPI Data Dictionary as there is no corresponding column.
- The only option to verify constrainability for a field is via SFAPI DescribeEx operation.
- SOAP response contains information on constrainability in corresponding element constraiable of the field, i.e. <constrainable>true</constrainable>
Find the below example of SOAP request / response.
SOAP request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sfobject.sfapi.successfactors.com">
<soapenv:Header/>
<soapenv:Body>
<urn:describeSFObjectsEx>
<urn:type>AdhocReport_1542</urn:type>
</urn:describeSFObjectsEx>
</soapenv:Body>
</soapenv:Envelope>
SOAP response
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<describeSFObjectsExResponse xmlns="urn:sfobject.sfapi.successfactors.com" xmlns:ns2="urn:fault.sfapi.successfactors.com">
<result>
<type>adhocreport_1542</type>
<entityInfo>
<adhocReportType>SINGLE_DOMAIN</adhocReportType>
<adhocReportName>test</adhocReportName>
<adhocReportSDS>emp_profile</adhocReportSDS>
</entityInfo>
<field>
<name>employee_USERS_SYS_USERNAME</name>
<dataType>string</dataType>
<label>
<value>Username</value>
<locale>en_GB</locale>
<mime-type>text/plain</mime-type>
</label>
<required>false</required>
<filterable>false</filterable>
<insertable>false</insertable>
<selectable>true</selectable>
<sortable>false</sortable>
<supportInOperator>false</supportInOperator>
<supportLikeOperator>false</supportLikeOperator>
<updateable>false</updateable>
<upsertable>false</upsertable>
<constrainable>false</constrainable>
</field>
<field>
<name>df_employee_USERS_SYS_USERNAME</name>
<dataType>string</dataType>
<label>
<value>Username</value>
<locale>en_GB</locale>
<mime-type>text/plain</mime-type>
</label>
<required>false</required>
<filterable>false</filterable>
<insertable>false</insertable>
<selectable>false</selectable>
<sortable>false</sortable>
<supportInOperator>true</supportInOperator>
<supportLikeOperator>false</supportLikeOperator>
<updateable>false</updateable>
<upsertable>false</upsertable>
<constrainable>true</constrainable>
<adhocReportFilterCondition>IN All</adhocReportFilterCondition>
<supportedOperators isList="true" xmlns="" xmlns:ns3="urn:sfobject.sfapi.successfactors.com">
<supportedOperator>equal to</supportedOperator>
<supportedOperator>in</supportedOperator>
</supportedOperators>
</field>
</result>
</describeSFObjectsExResponse>
</S:Body>
</S:Envelope>
Note that user defined Adhoc report entity with naming convention like AdhocReport_<Report Id>, property filterable of a field will be always set to 'false' by default in SFAPI Data dictionary.
For filtering of SFAPI Adhoc Report entity fields constrainable is a valid property and this needs to be set to 'true'.
Refer to KBA 2229489 for more details on how to set a field as constrainable and how to query constrainable fields.
See Also
Keywords
SFAPI, ad hoc, report, entity, dictionary, filter, filterable, constrain, constrainable, constrain by, adhoc report builder , KBA , LOD-SF-INT , Integrations , LOD-SF-INT-PAY , please use LOD-EC-GCP-PY* , How To