Navigating the Data

📘

Note:

This SafetyChain Power BI Connector documentation assumes users have an advanced level of experience using Power BI and therefore may not cover general Power BI desktop or web functionality.

Summary

The SafetyChain Power BI Connector provides you with a list of functions to generate tables which can then be used to transform your data through Power Query. Once you successfully connect and load your functions you can view them in your Power Query Editor (Transform Data).



📘

Note:

When the window opens, if the queries display an error indicator that says "Authentication.Error: Unauthorized” in the Transform Data window, it may be necessary to refresh the preview. To do so, select the Refresh Previews button and choose the appropriate option to refresh one or all queries. If your credentials are correct, this will resolve the error.

GetForms Example

Enter the parameters as listed

Click Invoke and the data will appear.

Rename the function accordingly for use within the Power BI Framework.



Function Parameters

📘

Note

Query performance depends on the volume of data retrieved within the selected time frame. Using Submitted Date Types and narrower date ranges can improve performance, but may exclude relevant data. Choose your date range carefully to balance speed and completeness.

All the functions use parameters to query and filter the data from SafetyChain. The parameters are defined below:

Parameter NameTypeDescriptionFunctions Used
  • Date Type* (Submitted, Processed, Modified):
text

Will be used with the date filters Start Date and End Date or Minutes Ago.

-**SubmittedDate **is the records date/time when it was submitted. This may be different then the date a record is processed. For example, submitting a record in Mobile that is offline and then processed at a later time when the device has connectivity.
  • **ProcessedDate **is the records date/time when a record has been received by the SafetyChain cloud service. As mentioned above this may differ then when a record is submitted.
  • ModifiedDate_is the date/time when the record was last updated. If there were no edits or updates on a record the value will default to the_SubmittedDate. For example, if a record is edited or a verification is linked to a record the ModifiedDate will update when the change occurred.
GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
Time Zone OffsetnumberUsed with the date filters Start Date and End Date or Minutes Ago to adjust time according to the time zone you are querying. In addition the Submitted, Processed and Modified dates will be provided in the provided TimeZone. e.g. 0 will return times in UTC. The offset should be in Hours. Example -6, -7, -8 for EST, CST, and PST.GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
Start Date*date/timeMust be used with End Date to create a date range query.GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
End Date*date/timeMust be used with Start Date to create a date range query.GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
Minutes Ago*numberUsed as sliding time scale to query from now to # of minutes ago. e.g. 1440 would be querying record data from 24 hours ago to now.GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
Form NametextIf left blank there would be no filter applied and must be used with Form Query TypeGetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
  • Form Query Type* (FormName, FormLike)
textUsed with Form Name to filter on FormName(exact match to the form name) or FormLike(uses a contains query on form name)GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords
  • Table Type* (Field Details, Field Values)
textProvides Field Values or Field Details and the results will format the table in a flat or vertical view. Field Details will be used to get all spec values, corrections, comments and field values. Field Values will provide the table with one row per record and field short name as each column and the value in each cell.GetRecordFields
Verification NametextUsed to filter verifications related to all records. This is an exact match filter, which will provide all records and their related verifications per each record. There can be more than one row per record as there can be multiple verifications per record.GetVerifications
  • Resource Type* (Items, Suppliers, Customers, Equipment)
textUsed to filter on resource type with the Resource Name. If using Resource Name, please make sure that name corresponds with the correct resource type. Resource Name can be left blank to get all resources based on the type.GetResourceDetails
GetFormsByResource
Tree LiketextUsed as a contains filter on category and resource name e.g. Items > Ice Cream > Finished Product > Round line - BE > 170571-67015A - TMK Oregon Stwbry Ic 6/1.75 Qt - BEGetResourceDetails
Resource NametextUsed to filter on exact Resource Name. Can provide a blank value ("") to get all resources. GetFormsByResource this field is required.GetResourceAttributes
GetLocationsByResource
GetFormsByResource
Request Identifier Should only be used when necessary.text/alpha numeric (10 digits)(Optional) Use this parameter when a function may be invoked concurrently by multiple simultaneous calls. Most functions begin by establishing a temporary "cache" table — named using the function name and User ID — that holds filtered record data to be joined with other data for the final output. Adding a RequestIdentifier appends its value to the cache table name, ensuring each concurrent call references a unique table and preventing conflicts.GetForms
GetLocations
GetResources
GetVerifications
GetRecords
GetRecordFields
GetVoidedRecords