Search code examples
powerappspowerapps-canvaspowerapps-formula

Use concat and lookup on dataverse table


I have a dataverse table like this:

E-mail: EDS:

user1@gmail.com 221

user1@gmail.com 123

MyEmail@gmail.com 13

MyEmail@gmail.com 21

user3@gmail.com 123

user4@gmail.com 221

I want to check which EDS -s have user access on.

for example, if user1 opens app it should return (221; 123)

Set(currentEDS, Concat(ConnexionConfigs, LookUp(ConnexionConfigs,'E-mail' = User().Email, EDS), "; ")) that's how my code looks like. I am logged in with MyEmail@gmail.com, for some reason code returns 21; 21; 21; 21; 21; 21; there is 21 6 times, I think thats because there is 6 records in my dataverse table.


Solution

  • Try using this formula:

    Concat(Filter(ConnexionConfigs, 'E-mail' = User().Email), EDS, "; ")
    

    You may need to change the data source and column names to match with your actual table and column names.

    Documentation:

    1. Filter, Search, and LookUp functions in Power Apps
    2. Concat and Concatenate functions in Power Apps