Whitespace PowerSuite - Next Collection Date
- What is it? This formula will return the next collection date for a particular service at a given property.
Inputs
This formula requires 2 inputs to be passed through to it:
-
the UPRN of the property
The mapped value must come from an address lookup question, using the propery_identifier variable option.
-
the Service ID
This input should be set to the ID of the Service to check against in Whitespace PowerSuite.
Return values
Value | Description |
---|---|
The next collection date | If there is one found for the Service, in YYYY-MM-DD format |
An empty string | If there is no date found, or an error occurred. |
Formula Logic
-
A check is made to see if the integration has been enabled in the Settings > Integrations page. If the integration is not enabled the formula returns an empty string.
-
A call to Whitespace PowerSuite's GetSiteCollections endpoint is made, passing the UPRN.
-
The returned collections are iterated over until one has a ServiceID property which matches the Service ID input.
-
If a matching collection is found, the NextCollectionDate property is returned. Otherwise, an empty string is returned.