PowerApps 门户列表查看与所选记录相关的数据

发布于 2025-01-12 17:47:04 字数 292 浏览 3 评论 0原文

情况是我有一个表格,其中填充了表中的数据。我希望在选择表单中的记录时能够查看相关表中的相关数据。如下面的屏幕截图所示,当单击列中的链接时,我希望显示一个弹出窗口,其中显示特定表中特定记录的相关数据。我正在尝试使用页面上的表单中的查看详细信息。如何查询相关数据并显示?

输入图片此处描述

The situation is that I have a Form filled with data from a Table. I want to be able to view related data from a related Table when a record in the Form is selected. As shown in the screenshot below, when clicking on the link in the column I want a pop-up shown with related data to that specific record from a certain table. I am trying to use View details from the Form that is on the page. How do I query the related data and display it?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

z祗昰~ 2025-01-19 17:47:04

我解决这个问题的方法是利用 jQuery 和 Dataverse API。不幸的是,我无法访问我编写的代码。但我将描述我如何凭记忆解决这个问题。

  1. 我不喜欢这样做,因为微软渲染的代码可能会改变。单击表中的项目后,将显示一个弹出窗口,然后我将使用 jQuery 选择要在该弹出窗口中添加其他元素的位置。我认为我需要使用一些特殊的方法来完成此操作,因为您需要“等待”直到弹出窗口显示并完全构建其元素或类似的东西。
  2. 然后我将使用 Dataverse API 来获取必要的信息。当弹出窗口显示时,您可以再次使用 jQuery 在 DOM 中的某个位置找到表中所选记录的相应 ID。通过 ID,您可以使用项目 ID 向 Dataverse 发送查询并获取您需要的任何数据。
  3. 从 Dataverse 获取数据后,我只是在客户端处理数据以构建表格并将其插入到弹出窗口中。

我记得这项工作就像一个魅力。最大的问题是弄清楚 Dataverse API,因为他们没有最清晰的文档,也没有庞大的用户群,因此很难找到帮助。

The way I approached this issue is by utilizing jQuery and the Dataverse API. Unfortunately, I do not hold access to the code that I wrote. But I will give a description of how I approached the issue from memory.

  1. Not something I liked doing because the rendered code by Microsoft could change. After an item from the table would be clicked, a pop-up would show and then I would use jQuery to select where I would want to add additional elements in that pop-up. I think I needed to use some special methods to accomplish this, because you need "wait" until the pop-up shows and fully builds its elements or something like that.
  2. Then I would use the Dataverse API to fetch the necessary information. When the pop-up shows, somewhere in the DOM you can find the respective ID of the selected record from the table by using jQuery again. With the ID you can send a query to Dataverse with the item ID and fetch whatever data you need.
  3. After fetching from Dataverse, I just processed the data on the client side into building a table and inserting it into the pop-up.

I remember having this work like a charm. Biggest issue was figuring out the Dataverse API, because they do not have the clearest documentation and not a big user base so it is harder to find help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文