PowerApps-将数据条目保存到空数据表,然后保存在SQL Server中

发布于 2025-02-03 16:48:44 字数 502 浏览 3 评论 0 原文

我已经在Power Apps中制作了以下屏幕:

我的目标很简单:我希望最终用户能够将数据输入到这些文本框中 - >用户单击“确定”按钮 - >在带有列的关系数据表中,下面的用户保存了数据;名称,数量和度量。

完成所有数据条目后,“保存”按钮应以JSON格式发送完整的数据表作为SQL Server存储过程的输入,该过程接受参数@json。这是如何完成的?

我尝试的:尝试制作画廊,数据表,表单等。但是所有这些都要求我连接到现有数据集。相反,我希望用户创建数据集,然后然后将数据发送到SQL Server数据库。

I have made the following screen in Power Apps:
enter image description here

My goal is simple: I wish the end-user to enter data into these text boxes -> User clicks "OK" button -> Data is saved for the user right below in a relational data table with columns; Name, Amount, and Measure.

Once all data entries are made, a "Save" button should send the complete data table in JSON format as input for a SQL Server stored procedure, which accepts the parameter @json. How is this accomplished?

What I tried: Tried making a gallery, data table, form, etc. But all of these require me to connect to an existing data set. I instead want the user to create the data set, and then have the data sent to a SQL Server database.

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

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

发布评论

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

评论(1

寒尘 2025-02-10 16:48:44

使用

  • 在SQL数据库中创建表格中的表格
  • ,将SQL连接器添加到您的PowerApp
  • Authentation到Connector中,
  • 请选择该表以连接到连接,
  • 然后相应地编写patch()逻辑,
  • 您不需要一个存储过程

作为替代方案,如果您真正想使用存储过程,请将Power Automate连接到PowerApp并从那里运行存储过程。不过,这引入了依赖性。您的电话。

​>当心:,

  • 如果您不使用Active Directory Auth设置SQL Server,则您将共享您的权限, 隐式,与您共享PowerApp的人。
  • 最好使用SQL创建一个组,将角色分配给组,然后将用户分配给组
  • ,然后PowerApp的每个用户必须明确使用 > perms
  • 请参见在这里

Use the built-in SQL Connector

  • Create the table in the SQL database
  • Add the SQL Connector to your PowerApp
  • Authenticate to the connector
  • Select the table to connect to
  • Then write your Patch() logic accordingly
  • You don't need a Stored Procedure

As an alternative, if you realllly want to use a Stored Procedure, connect Power Automate to your PowerApp and run the Stored Procedure from there. This introduces dependencies though. Your call. Example

Beware:

  • If you don't setup the SQL Server with Active Directory Auth, you will share your permissions, implicitly, with whomever you share the PowerApp with.
  • Best to use SQL to create a Group, Assign Role(s) to the Group, then assign Users to the Group
  • Then each user of the PowerApp will have to explicitly authenticate using their perms
  • See here
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文