cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CBI_Oshin
Helper II
Helper II

How to ClearCollect on a sharepoint list and custom fields

Hi there,

 

I have a sharepoint list called 'ActiveUsers' and a column called Users with names in it. I want to create a collection with all the users name from the list as well as custom fields that I want to add to it as they would be constant fields.

 

How would I ClearCollect the sharepoint list and custom fields on one collection.

 

Thanks for your time in advanced

 

Regards

Oshin

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User II
Super User II

@CBI_Oshin 

Does your list have duplicates in the users column?  If not, you can create a collection with user names and custom fields as follows:

ClearCollect(yourCollection,ShowColumns(SPlist,"UserName","Customfield1","Customfield2",etc))

Where the columns in the formula are replaced with the actual column names for the users and custom fields.

View solution in original post

2 REPLIES 2
Drrickryp
Super User II
Super User II

@CBI_Oshin 

Does your list have duplicates in the users column?  If not, you can create a collection with user names and custom fields as follows:

ClearCollect(yourCollection,ShowColumns(SPlist,"UserName","Customfield1","Customfield2",etc))

Where the columns in the formula are replaced with the actual column names for the users and custom fields.

View solution in original post

Thanks for your response, wasn't quite what I needed but helped me figure it out.

 

Had to do 

ClearCollect(ActiveUsers, ShowColumns('SPLIST', "Users"), {Users:"Customfield1"}) 

 

Thanks!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (31,391)