As topic, is there a way to show all column name from a sharepoint list? maybe a function that can generate a collection that contain all column name from a SP list?
Hi @fxavier ,
If you Collect the SharePoint List, all the columns will be in the collection
ClearCollect(
colYourColleciton,
YourSPListName
)
You can display any fields you want in a gallery with the Items as the Collection.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Onvisible of the screen or on a button, create a collection;
ClearCollect (MyNames, SharePoint.ColumnName)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
@WarrenBelz @eka24
There may be some misunderstandings. What I want to do is to extract all existing Column Name from a sharepoint list. LIke:
Input: ShowAllColumnName(SharepointListName)
Output: ["ID","Model Picture", "Model Number", "Selector Switch", "Fuel Oil Level", "Lubrication Oil Level"]
Is it possible?
ClearCollect (MyNames, Sharepointlist); Clear (MyNames)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
but how do you get the column name from a collection?
I need to get the column name because I don't want to type them all out by my self. My sharepoint list have over 50 columns, I need to generate a collection include all the existing column name from a SP list.
Hi @fxavier ,
No, not possible as text. The column name itself is not an attribute you can "collect" in a statement other than referring to the actual name to get the contents of the field.
You can view the headings of a collection in View>Collections, but that is not something able to be done other than in Design mode (and that is only viewing).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Your request may not be clear.
The formula i gave shows you all the column names in the Collection MyNames.
Have you tried the formula, if you have tried, have you checked the collection whether the table names are there or not from:
File....Collection
Or you meant getting the Name of the column into a textbox
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
what I want to do is get the column name as string and reuse it to build a form. Because I have over 50 columns want to put in to the form, I don't want to manually input it. What I am thinking is to store all the column name as string in a Collection, then use Last(FirstN()) to get those column name. Since there is no way to extract all column name from SP list as string, this seems like a dead end.
What you are trying to do is not possible. You can't use a collection as a Datasource for a form.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
User | Count |
---|---|
260 | |
109 | |
93 | |
56 | |
41 |