Orbeon Forms:提取表单摘要数据

huangapple go评论88阅读模式
英文:

Orbeon Forms: Extracting Form Summary Data

问题

我们在我们的一个表单顶部创建了一个“摘要部分”来显示主要表单数据。为了做到这一点,我们使用了一个“解释性文本”控件,以及许多“模板参数”来从其他控件中提取数据(直接或通过xPath)。这个方法运行良好。。

然而,当我们试图将表单数据提取到另一个报告工具中(通过API)时,我们意识到API只会传输具有值的数据,例如文本框、单选按钮、复选框等,而不包括“解释性文本”。

所以,这里是问题。

我们需要将这个“摘要”数据放到一个普通/格式化的文本框中,但是在这些控件中不能像“解释性文本”那样使用“模板参数”。

我们尝试使用xPath将数据从一个控件移动到另一个控件,但是那并没有起作用。

那么,解决这个问题的最佳方法是什么?

问候

PeteA

英文:

We create a "summary section" at the top of one of our forms to display the main form data. To do this we used an Explanatory Text control along with many Template Parameters to extract the data from other controls (either directly or via xPath). This works fine..

However, when we came to extract the form data into another reporting tool (via API) we realised that the API only brings over data with a value e.g. text box, radio-button checkbox etc, and NOT the Explanatory Text..

So, here is the question.

We need to put this "summary" data in either a Plain/Formatted text box instead, but you can't use Template Parameters in these control in the same way as Explanatory Texts.

We tried using xPath to move the data from one control to the other, but that didn't work.

So what is the best way to address this?

Regards

PeteA

答案1

得分: 0

以下是翻译好的部分:

"Indeed, the text shown by the Explanatory Text isn't saved in the data, which is by design, as in general that text is 'explanatory' (hence the name of the control), and isn't part of the data captured by the form.

So I'd instead look at a Plain or Formatted Text Area, as you did. For those, you won't be able to use a template, but you can use a calculation, building the text using 'concat()', and referring to the value of other controls with '$my-control'. If the text is short, it might just be fine; however if it is long, I can see how using the Explanatory Text would be quite a bit more convenient."

英文:

Indeed, the text shown by the Explanatory Text isn't saved in the data, which is by design, as in general that text is "explanatory" (hence the name of the control), and isn't part of the data captured by the form.

So I'd instead look at a Plain or Formatted Text Area, as you did. For those, you won't be able to use a template, but you can use a calculation, building the text using concat(), and referring to the value of other controls with $my-control. If the text is short, it might just be fine; however if it is long, I can see how using the Explanatory Text would be quite a bit more convenient.

huangapple
  • 本文由 发表于 2023年5月17日 16:52:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76270226.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定