How to retrieve value in selected SharePoint list item column

前提是你 提交于 2020-04-30 11:07:43

问题


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

  • list teachers
  • list classes with foreign key column teacherID to teacher item

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. "For selected item" in classes
  2. Modify teachers item referenced by classes.teacherID

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.

What I've tried:

  • 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).

  • 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.


回答1:


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. "For a selected item" in classes
  2. "Get item" in classes
  3. "Update item" in teachers



来源:https://stackoverflow.com/questions/61139897/how-to-retrieve-value-in-selected-sharepoint-list-item-column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!