If you have a choice site column or even a field in list , library and want to get the choices values that is present in that field , here is how you can get that.
To demonstrate, I have one site column with name US States which holds US state names.
Let's write PowerShell to get this site column reference and then take out all the choice values in it.
If you would like to know what this PowerShell initial few lines are all about, I would recommend reading Get Values From Configuration post and then continue.
Now run the script
and here is the result. you get each choice value in the choice column.
I hope this helps.
No comments:
Post a Comment