选择具有最新日期的项目。 [英] Selecting item with the latest date.

查看:58
本文介绍了选择具有最新日期的项目。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表(列表A),用于根据用户输入的数据生成分数。在另一个列表(列表B)中,分数与修改日期以及通过工作流程的标题一起保存。这是一个简单的流程,每次在列表A中创建或更新项目时,它只需添加一个带有分数和日期
的新项目。

I have a list (list A) that generates a score from the data users enter. In another list (list B), the score is saved with the modified date as well as the title via a workflow. It's a simple flow in that it simply adds a new item with the score and date every time an item is either created or updated in list A.

我遇到的唯一问题无论分数是否有变化,都会在列表B中输入一个条目。我的选择是更新工作流程,以便更新唯一的时间列表B是在分数发生变化时。

The only issues I have is that regardless of whether there was a change in score, an entry is made into list B. My preference is to update the workflow so that the ONLY time list B is updated is when there is a change to the score.

我的想法是,如果我可以在列表B中循环所有项目,其中标题与列表A正在更新的标题相匹配,然后在列表B中找到具有最新修改日期的分数,并进行比较到了更新后的列表A得分,然后我可以
创建一个新条目,或者结束工作流程。

My thinking is that if I can loop through list B for all items where the title matches the list A title that is being updated, and then find the score in list B with the latest modified date, and compare that to the updated list A score, then I can either create a new entry, or end the workflow.

那就是说,我是设计师的新手,而且我'我不太确定如何使上述情况发生(或者甚至是一个好的方法)。任何人都有关于如何设置它的想法和/或指导?

That said, I'm new to designer, and I'm not quite sure how to make the above happen (or if it is even a good approach). Anyone have thoughts and/or guidance on how to set this up?

推荐答案

在ListB中创建一个新列(ListAID)  。

Create a new column(ListAID)  in ListB  .

因此,工作流程将在列表B中创建一个项目,其中包含分数和项目ID(例如,ID = 20,分数为80)。

So the workflow will create an item in List B with score as well as the item id (ex ID =20 and Score is 80 ) .

如果对列表A中的ID = 20项进行任何更新,它将检查工作流是否与相同的ID(ID = ListAID)匹配,然后在ListB中更新,否则它会创建新项。

Once any update happens to ID =20 item in List A , it will check the workflow if it matches same ID (ID =ListAID) , then it updates in ListB other wise it creates a new item .

希望它有效。


这篇关于选择具有最新日期的项目。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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