getLocationsByResource Function

This function will operate similarly to the getFormsByResource function, except the result will provide all Locations associated with the resource. In this function it will only need the resourceName as a parameter.

The values will be determined by the following parameters:

  • Resource Name (Required)

πŸ“˜

Note:

Resource Name parameter is required, however can provide a blank value ("") which will provide all resources and their related locations.

For more detail on the parameters see the full list of descriptions here.

function (resourceName as text)

Invoking the Functions

Here is an example of invoking them using Power Query or through the visual editor.

 getLocationsByResource("000MS_C_inst")

πŸ“˜

Note:

You can fill out the function parameters and click _Invoke _to create the table automatically. See example below.

getLocationsByResource Result:

The following field columns will be outputted in a table.

#table({
  "resourceId",
  "resourceName",
  "locationId",
  "locationName",
  "row"
}, {})

πŸ‘

Tip:

You can invoke the function on a list of values see examples in getFormsByResource.