Navigating the Data

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); see below.

Invoking a Function

Invoking a function can be done using Power Query Editor or can be done through the visual editor by entering a set of parameters. First start by selecting a function int the Queries navigation pane and a form of parameters to enter will be provided to invoke your function. These parameters will be used to query your data from SafetyChain. Once filled out click Invoke and a table will generate with your data; see example below of the table generated using the getResources_Summary function.

You can also invoke your functions using power query. This will provide you the ability to programmatically execute your queries in a number of different ways including using parameters as a way to store and re-use values across your functions. See the example below for executing the same output as above.

 getResources_Summary("Modified", 0, null, null, 1440, null, null)

Function Parameters

All the functions use parameters to query and filter the data from SafetyChain. See glossary of how each parameter is used and the functions associated with them.

Parameter NameTypeDescriptionFunctions Used
Date Type (Submitted, Processed, Modified):textWill 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_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
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_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
Start Date* date/timeMust be used with End Date to create a date range query.getForms_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
End Date* date/timeMust be used with Start Date to create a date range query.getForms_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
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_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
Form Name textIf left blank there would be no filter applied and must be used with Form Query TypegetForms_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
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_Summary
getLocations_Summary
getResources_Summary
getVerifications
getRecords
getRecordFields
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

What’s Next

Let's look in more detail on using some of the functions