GroupBy返回列表结果 [英] GroupBy return list results
本文介绍了GroupBy返回列表结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何能够使用列表中的javascript返回列表项,按结果模仿组,而不创建if / switch语句?
How would i be able to return list items using javascript from a list, mimicking a group by result, without creating if/switch statements?
我在创建时遇到问题数组并根据状态推出任务标题。
I am having trouble creating the arrays and pushing the task titles out based on the status.
例如,从任务列表中,将html推送为:
For example from a task list, push html as:
已完成:
-task 1
-task 2
正在进行中
-task 5
-task 6
已取消
-task 3
-task 4。
推荐答案
查看
链接 ,您可以将JSOM流程用于组中的提取列表项。
Have a look into this link , You can use JSOM process for the fetching list items in Group.
<View>
<Query>
<GroupBy Collapse="TRUE" GroupLimit="30">
<FieldRef Name="TaskStatus"/>
</GroupBy>
</Query>
<ViewFields>
<FieldRef Name="Title"/>
<FieldRef Name="Task"/>
</ViewFields>
<RowLimit Paged="TRUE">30</RowLimit>
</View>
这篇关于GroupBy返回列表结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文