Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.3k views
in Technique[技术] by (71.8m points)

Distinct Values in a PowerApps filter formula

I use some code found in MIKAEL SVENSON blog: https://www.techmikael.com/2019/01/a-no-nonsense-solution-to-implement.html.

ForAll(
    Filter(
            Cities, // SharePoint list with all cities
            Country.Id = CountrySelector.Selected.Id // Pick cities where country matches the selected one
        )
    ,
    {
        Value: Title, // Create a new item with Value/Id, which will save correct
        Id: ID // It's important to have Value as the first field!
    }
)

How can I be sure with the code to have distinct values without having to clean the data? I tried things like this but with no succes:

ForAll(
    Distinct(Filter(
            'Batiments/Zones', 
            Site.Value = SiteSelection.Selected.Value
        ),Value)
    ,
    {
        Value: Title, 
        Id: ID 
    }
)

But code isn't something I master unfortunately.

Thank you for you help


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...