Introduction: For the veterans of PowerApps, the Choices function has been a cornerstone, primarily when working with SharePoint or Dataverse datasources. The recent PowerApps update has brought a substantial enhancement to this function, enabling users to filter results effortlessly. This piece will shed light on this update, particularly in the SharePoint context.
An Insight into the New Choices Function Update
As of May 20, 2021, an intriguing modification has been made to the Choices function. Although this update remains undocumented, its presence has already started making waves. The function now not only retrieves lookup items but also boasts a search criteria parameter, magnifying its utility.
Diving Deep: Understanding the Choices Function with an Example
To elucidate the workings of the Choices function, we’ll use the ‘Property Documents’ from a SharePoint list as a reference. This list has a lookup column anchored to a ‘Property’ list, illustrated in the provided screenshot.
By incorporating a data table control and leveraging the formula below, the Choices function unveils a list of property records. Each record features two columns – id and Value, with the former mirroring SharePoint’s native id column.
Unlocking the Search Potential of the Choices Function
One might wonder about the search parameters and target fields for the Choices function. It predominantly searches within the Value column. A vivid example can be understood when we set the search term as “road”, aiming to retrieve properties containing “road” in their address:
Interestingly, the function doesn’t utilize a ‘contains’ type search, as no records are fetched with the above term.
But, tweaking the search term to “30” paints a different picture. It fetches records that initiate with “30”, confirming the Choices function’s affinity for “starts with” search parameters:
Conclusion: The evolutionary trajectory of the Choices function is commendable. The feature now effortlessly sifts through records, zeroing in on those that commence with the stipulated search term. It significantly trumps the erstwhile method of nesting Choices within a Filter call. As PowerApps continues to evolve, mastering such functionalities becomes imperative. For any hurdles, remember, our experts at SoftwareZone365 are always ready to assist, ensuring you harness the full potential of PowerApps.