SharePoint列表中列的总和. [英] Total Sum for columns in SharePoint List.

查看:103
本文介绍了SharePoint列表中列的总和.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的支持团队,


请咨询.我当前在SharePoint 2013上使用信息路径和设计器.


Please advice. I'm using infopath and designer currently on SharePoint 2013.



推荐答案

您好,SP2013Devp,

您可以在newform.aspx中使用PreSaveAction函数.

Hi SP2013Devp,

You can make use of PreSaveAction function in your newform.aspx.

使用F12获取child1和child2的ID:

然后在newform.aspx页中添加内容编辑器Web部件,并在内容编辑Web部件中添加以下javascript:

Then add content editor web part in the newform.aspx page, add the following javascript in content edit web part:

<script type="text/javascript"> function PreSaveAction() {

var a = document.getElementById("child1_1cf6ad20-984b-4604-8036-c4b6dfce3875 _

var a = document.getElementById("child1_1cf6ad20-984b-4604-8036-c4b6dfce3875_


NumberField"). var b = document.getElementById("child2_4b14368b-50e6-43ed-8fb7-0353f1c92185 _
NumberField").value; var b = document.getElementById("child2_4b14368b-50e6-43ed-8fb7-0353f1c92185_


NumberField").value; var c = parseInt(a)+ parseInt(b);
NumberField").value; var c=parseInt(a) + parseInt(b);

if(c> 10){ alert('总值大于10'); } 返回true; } </script>

if (c>10) { alert('Totalvalue is greater than 10'); } return true; } </script>

注意:更改" child1_1cf6ad20-984b-4604-8036-c4b6dfce3875 _

Note: change "child1_1cf6ad20-984b-4604-8036-c4b6dfce3875_


这篇关于SharePoint列表中列的总和.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆