计算的SharePoint [英] Calculated SharePoint

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

问题描述

我现在SharePoint无法从查找列表中进行计算,但是也许我们可以在创建项目时对工作流进行处理.

问题是这样的:

当我们创建一个新的员工时,我们需要为此选择工作,因为价格是固定的,并且我们有一些关于员工的红利字段.

例如:工作清单

标题,价格

IT,5000

经济,4000

以此类推

这个人既可以作为IT人员,也可以作为经济人,这就是为什么我需要为此选择多值的原因.

选择工作正常,在我的列表中,我认为:

工作:IT;经济

价格:5000; 4000

我需要对此求和,并与不是查询的其他字段进行计算.

我该如何实现?我如何修剪这个值,以便在A之后提交5000;字段B.

我使用SharePoint设计器,而我们不能使用Som JavaScript.

谢谢

解决方案

在无需进入详细工作流程语句的情况下,在2013年工作流程中,从当前记录.为当前记录中的作业查找字段设置工作流变量. (将返回字段"用作:分隔的查找ID逗号)

变量值应如下所示:

JobIds = 3,2,1

从那里,您必须执行一些字符串操作以从变量中提取每个ID.基本上定义变量的开始,结束和长度.首先在变量值的末尾添加逗号,以便获取最后一个值.

JobIds = 3,2,1,

浏览所有ID,从作业列表中读取金额并进行累积

要解析值,请使用在字符串中查找子字符串"为了找到下一个逗号,使用该逗号来计算长度,使用从字符串的开头提取".获取作业列表ID,使用作业列表ID获取第一个作业的数量,然后替换 使用从具有长度的索引中提取字符串的子字符串",将JobIds变量与仅字符串的剩余部分一起使用.

JobIds = 2,1,

当逗号用尽时,查找结果将返回-1,使用该值结束循环.


I now the SharePoint cant calculate from lookup list but maybe we can do somthing with a workflow when item is created.

The question is this:

When we create a new employéer then we need to select the job for that because the prices is fix and we have som bonus fields we fill out about the employer.

Ex: Job list

Title, Price

IT, 5000

Economi, 4000

and so on

The person can both work as IT and as Economi and thats why i need to selected multivalues on that.

The selection is working fine and in my list i se this:

Job: IT; Economi

Price: 5000; 4000

I need to SUM this and calculate with others field who not is lookup.

How can i achive this ? how can i trim this value so 5000 is filed A and after ; field B.

I use SharePoint designer and we cant use som JavaScript.

Thanks

解决方案

Without going in to the detail workflow statements, in your 2013 workflow retrieve the record IDs for your Job list from the current record. Set a workflow variable for the job look up field in the current record. (Use Return Field as: Lookup Ids Comma Delaminated)

The variable value should look like this:

JobIds = 3,2,1

From there you have to do some string manipulation to extract each ID from the variable. Basically define variable start, end and length. Start by adding a comma to the end of the variable value so you can get the last value.

JobIds = 3,2,1,

Loop through all of the Ids reading the amounts from the job list and accumulating them

To parse the values use "Find substring in string" to find the next comma, use that to calculate length, use "extract from beginning of string" to get the Job List ID, Use job list id to get the amount for the first job, then replace the JobIds variable with just the remaining portion of the string using "Extract substring of string from index with length"

JobIds = 2,1,

When you run out of commas the find will return -1, use that to end your loop.


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

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