Masking disabled fields
Data model fields that have been disabled in an instance are masked in advanced ad hoc query results. The fields will not be removed completely so that existing behavior and functionality is not affected; for example, if you have saved reports that query the newly disabled field, the reports will still validate and do not need to be updated to remove that field.
This applies only to fields that were enabled and populated with data and then were later disabled. Any existing or newly disabled fields will behave the same way. Fields that have never been enabled are not affected.
Disable a field
Administrators and data managers can disable fields in the Network Data Model.
Before a field, or a set of fields (for example,
HCO_focus_area__v fields), is disabled, users are reminded that the field data will become unavailable. Confirm that the field should be disabled.
Queries containing disabled fields
If users write an advanced SQL query containing a disabled field, NULL is the only value returned for the field; every value is replaced with NULL when the query is executing. For example, if the query contains the disabled field in the WHERE clause, ON clause, or when the query performs a calculation, NULL will be the only value returned.
In this example, the field
major_class_of_trade__v is a disabled field.
SELECT vid__v, hco_type__v, major_class_of_trade__v FROM hco WHERE major_class_of_trade__v IS NULL ;
This query will return all HCO records because every value for
major_class_of_trade__v is considered NULL to the query.
Users cannot query on actual values for disabled fields because the query builder replaces the values with NULL.
For example, if the query contained an actual value for
major_class_of_trade__v, no results would be returned.
SELECT vid__v, hco_type__v, major_class_of_trade__v FROM hco WHERE major_class_of_trade__v = '11'
The query will find no HCOs where the major class of trade is Pharmacy (Network code, 11) because the data is masked for that disabled field.
When the field is disabled in the Network Data model, the data is immediately masked in reports; it is not dependent on the reporting database updates.
In the report results in the Network UI, field names for disabled fields display but the data is masked with Field Disabled.
If users download the report, two options are available: Description and Code.
The behavior of field data in the report depends on the option that you select.
Code - The downloaded report contains the field name but the column is NULL; no data displays. If you are using the report for downstream systems, use this option so that the field data is blank and doesn't affect your integration.
Description - The downloaded report will contain the field names with the data masked as Field Disabled. This is a string masking that can be used on fields that are not string fields (for example, integer fields). This option provides feedback for users who would not know that the field is disabled.
Saved and scheduled reports
When saved reports are run and downloaded, any masked fields will contain NULL values. Likewise, after a field is disabled, the next time a scheduled report runs, the field will contain NULL values. Reports that are sent to an FTP location will also contain NULL values for disabled fields.
If the data model field is enabled again after being disabled, the field values are available again in reports. Any changes to the data while the field was disabled is tracked and available for users.