[英]SharePoint Sandboxed Custom Workflow Activity to get value from another list based on multiple criteria
I'm trying to write a sandboxed custom workflow activity that would go to another list and get a value of a field based on values of multiple other fields combined. 我正在尝试编写一个沙盒自定义工作流程活动,该活动将转到另一个列表并根据多个其他字段的组合值获取一个字段的值。
List A 清单A
(essentially the combination of State and City makes the row uniquely identifiable) (基本上,州和城市的组合使得该行可以唯一标识)
List B 清单B
Constrains: 限制条件:
Problem: What I would need is a sandboxed custom workflow activity that triggers on List B item added/changed. 问题:我需要的是一个沙盒自定义工作流程活动,该活动在添加/更改的列表B项目上触发。 When triggered, activity grabs the State and City values from the item in list B, goes to List A and searches for a combination of the same State and City.
触发后,活动从列表B中的项目中获取州和城市的值,转到列表A,然后搜索相同州和城市的组合。 When found, it grabs the associated population.
找到后,它将捕获相关的人口。 Lastly it multiplies the population by the % from "Affecting % of population" and pastes that result into the "Population Affected" field.
最后,将人口乘以“影响人口百分比”中的百分比,然后将结果粘贴到“受影响的人口”字段中。
Bonus: At some point, I will also need a sandboxed custom workflow activity that triggers on List A item changed (the population field). 奖励:在某个时候,我还需要一个沙盒自定义工作流程活动,该活动在列表A项更改(填充字段)上触发。 When the population for specific State+City combination changes, the activity would go to List B and update all "Population Affected" fields that satisfy the same State+City for all companies (multiple rows).
当特定州/市组合的人口发生变化时,活动将转到列表B,并更新所有公司(多行)都满足相同州/市的所有“受影响人口”字段。
Thanks in advance! 提前致谢!
What you need is an event receiver. 您需要的是事件接收器。 Nothing you've stated above leads me to believe you need a workflow.
您上面所说的任何内容都不会让我相信您需要工作流程。 Look over my blog to see your options:
查看我的博客以查看您的选择:
http://mattbramer.blogspot.com/2012/11/binding-event-handlers-to-sharepoint.html http://mattbramer.blogspot.com/2012/11/binding-event-handlers-to-sharepoint.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.