Hi All
Need your help to solve an issue.
I need to get the data from SharePoint List view. That list has 4 views. Tried to get the data using Get List items but it’s not providing that particular view data.
Also, not getting Column type Person or group data, just getting System.Object in that column.
Assigned to column looks as following in SharePoint List
Can someone please help me to get this resolve?
Thanks
Naresh
@Naresh_Upadhyay
Get List Info returns you SharepointList type of result. From this result you can get the Columns like this.
getliostinfoOutputvariable.Columns(0) - This should give you fist column. Change the column index to the desired one to get the column.
Anil_G
(Anil Gorthi)
November 22, 2024, 5:29pm
3
@Naresh_Upadhyay
each view will have different id…try to use id instead of name
coming to values…check how to get each column value…instead of update can be used to get as well in below link
ListItem.Fields.Where(function(x) x.DisplayName.Equals(“Display Name of Field”))(0).Value
@Sreelatha278
For that you can get the required index by using a for loop on the retrieved values
Listitem.fields
And then use if condition to check the fieldname currentitem.DisplayName.Equals("Requiredname")
And on then side use the assign as needed
Or you can directly use this in assign
ListItem.Fields.Where(function(x) x.DisplayName.Equals("Display Name of Field"))(0).Value = "Value to be updated"
instead of displayname use name if you want to use the backend names of the fields
Chee…
also as per screenshot we can see that you might have used somethign like variable.ToString…instead try String.Join(",",varaible) this would show data
cheers
Thank you @Anil_G and @ashokkarale for replying on my query!! I am able to get the view data but still unable to retrieve data from column type Person and Group.
1 Like
Anil_G
(Anil Gorthi)
November 26, 2024, 4:30pm
5
@Naresh_Upadhyay
Glad you were able to get the records now
I believe you would get only the backend id from eprson and group column
thats a limitation
if that has changed and if you are getting a json strcuture then it should contain data but i believe it si not changed
cheers
How we can get this from backend?
Anil_G
(Anil Gorthi)
November 26, 2024, 4:34pm
7
@Naresh_Upadhyay
directly you will get only ID which directly you would have already got it
cheers