如何在选定的 SharePoint 列表项列中检索值 [英] How to retrieve value in selected SharePoint list item column

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

问题描述

在 SharePoint 列表中,我有一列包含另一个列表的外键 ID.例如:

In a SharePoint list, I have a column that holds a foreign key ID to another list. For example:

  • 列出教师
  • 列出班级,外键列teacherID到教师项目
  • list teachers
  • list classes with foreign key column teacherID to teacher item

我正在尝试创建一个 Power Automate 流程,该流程以 中的 SharePointFor a selected item"开始,然后修改引用的 teacher 列表项.>

I am trying to create a Power Automate flow that starts with a SharePoint "For a selected item" in classes and then modifies the referenced teacher list item.

  1. 中的对于所选项目"
  2. 修改由班级引用的teachers项.teacherID

All(!) 我需要做的是获取teacherID 的值,但结果证明这非常困难.我怎样才能做到这一点?我是 Power Automate 的新手,因此欢迎提出任何建议.

All(!) I need to do is get the value of teacherID, but that has turned out to be incredibly difficult. How can I do this? I'm new to Power Automate so any suggestions appreciated.

我尝试过的:

  • 创建了第二个操作,将第一个操作的输出通过电子邮件发送给我(因为我不知道任何其他调试"或监视"方法).在电子邮件正文中添加了许多不同类型的动态内容和表达式.teacherID 永远不会出现.它不在动态内容字段列表中.我在尝试过的表达式中找不到,例如triggerBody, trigger, output, actions('For a selected item')未知原因,但我目前并不想了解原因).在 JSON 中,到目前为止我只能检索到 IDitemURLfileNameFileId(看起来和 ID 一样).

  • Created a second action to email me output from the first action (because I don't know any other way to "debug" or "watch" this). Added many different types of Dynamic content and expressions to the email body. teacherID never appears. It is not in the list of Dynamic content fields. I cannot find in expressions tried e.g. triggerBody, trigger, output, actions('For a selected item') (which is an error for some unknown reason but I'm not trying to understand why at the moment). In the JSON, all I have been able to retrieve so far is ID, itemURL, fileName, FileId (which looks the same as ID).

我的下一个想法是,好吧,也许对于选定的项目"没有访问其他列表列的权限,但也许获取项目"可以.所以,我插入了一个Get item"(单数,不是Get items),但这令人沮丧地没有任何区别.

My next thought was, okay, maybe "For a selected item" doesn't have access to the other list columns, but maybe "Get item" does. So, I inserted a "Get item" (singular, not "Get items) but this frustratingly did not make any difference.

我想要做的应该非常简单明了.文档很少,而且很烂.

What I am trying to do should be very simple and straightforward. The documentation is sparse, and it sucks TBH.

推荐答案

如果查找列名称为 teacherID,则应在流程中使用 teacherID Id 来查找教师

If the lookup column name is teacherID, you should use teacherID Id in the flow to find the item in teachers

您可以像这样创建流程:

You could create the flow like this:

  1. 中的对于选定的项目"
  2. 中获取项目"
  3. 教师
  4. 中的更新项目"
  1. "For a selected item" in classes
  2. "Get item" in classes
  3. "Update item" in teachers

这篇关于如何在选定的 SharePoint 列表项列中检索值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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