cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RiccoHipp1903
Resolver II
Resolver II

Concat different entries if they share 2 same column entries

Hello guys,

 

I have the following thing I Want to achieve.

 

  1.  I have a Collection
  2. EmployeeRightType of Access
  3. For any Right and type of access I have an separated entrie.
  4. Now I want to Patch the Collection to Dataverse Table 

The thing is I don't want to have different Entries if they share the same entries on 2 columns.

So if Employee and Type of Access are the same, all rights should concatenate together to a ',' separated entry

 

So i want to achieve, that it Looks like this 

RiccoHipp1903_1-1667213832918.png

EmployeeRightType of Access
Berta, BertaZFARead
Berta, BertaZFARead
Erdbeer, EmilyZFA_LOGRead

 

If the same person has the same type of access, the rights should concat so that later on a patch is 

{Employee: "Berta, Berta" , Rights: "$Right1$, $Right2$, $Right3$.....", ToA: "Read"}

Berta, BertaZFA, ZFARead
Erdbeer, EmilyZFA_LOGRead

 

Is there an actual way to achieve my needs

 

PS: The names and the not 

2 REPLIES 2
v-qiaqi-msft
Community Support
Community Support

Hi @RiccoHipp1903,

Do you want to duplicate the records and save them into Dataverse?

 

You need to generate a new collection without duplicated records using the following formula:

ClearCollect(colNew, ForAll(Distinct(YourCollection, ThisRecord), Result))

Then Patch the collection to Dataverse as below:

ForAll(colNow,Patch(Table,Defaults(Table),{Column1:Employee,Column2:Right,Column3:TypeOfAccess}))
Best Regards,
Qi
RiccoHipp1903
Resolver II
Resolver II

Yeah I got, why you think that. I described it badly because i had to hide sensitive info.

 

Example

NameRightToA
RiccoRight1Read
RiccoRight2Read
QiRight1Write
QiRight5Edit

 

This should patch like this

NameRightToA
RiccoRight1, Right2Read
QiRight1Write
QiRight5Edit

 

So in words: 

If the name and the type of Accesss are the same, The Rights should concatenate with a ',' as seperator - so that i got one entrie

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,686)