Remove Broken Refs

Remove Broken Refs

Occasionally when you are working on setting up the relationships between recs in a station, you will delete a Component that has other Components referencing it. For instance, if we delete an equip but not the points, the points will have an invalid equipRef. To fix this problem, there is an action on NHaystackService called removeBrokenRefs that you can invoke. This action deletes all of the refs in the station that do not reference a valid rec. Each time a broken ref is deleted, a message is also generated in the station log telling you which Component was fixed.

This can be executed in Niagara.

Remove Broken Refs Action

To execute this action through Niagara, the user would follow the below steps:

  1. Open Niagara workbench
  2. Open the Station
  3. Navigate to Config > Services > NHaystackService
  4. Right click on NHaystackService to select "Remove Broken Refs"
  5. Once executed, thats it just refresh your connector and you should be good go.