FAQs(常见问题解答)¶
This page discusses some common questions and debugging steps that may be helpful to reference when using Foundry Forms.
What can I use instead of Foundry Forms?¶
Foundry Forms is no longer the recommended approach for data entry or writeback workflows on Foundry. Instead, build user input workflows with the Foundry Ontology, representing the relevant data structures as object types and configuring the writeback interaction with Actions.
Actions provide more robust and granular control over the permissions associated with adding, editing, and deleting data, including respect for restricted views and configuring complex conditional permissions. Furthermore, Actions can be backed by Foundry Functions, allowing for more expressive writeback logic.
In addition to the built-in Form builder in the Actions configuration, Actions are natively supported in Workshop and Slate where complex data entry user experience can be crafted with the full suite of application building tools.
Actions also automatically generate API bindings for the Foundry API, where external applications write data into Foundry, and interface with webhooks, through which Actions can write data into external data systems or trigger other downstream effects.
There is currently no timeline for deprecating Foundry Forms, and existing implementations using Foundry Forms will be supported. New workflows are strongly recommended to use an Ontology-based approach, and it is not expected that Foundry Forms will receive new features, enhancements, or non-security-related fixes.
How do I store multiple values?¶
Various field types allow respondents to select multiple values (for example, checkboxes, dropdown and list). With Fusion sheets, values are automatically stored in a single cell as an array. With object types, some additional setup is required:
- In the schema for both the source and writeback datasets, the relevant column must have the type
Array<X>, whereXis a basic type likeStringorInteger. - In the Ontology configuration, the relevant property must have the same base type
X, and the checkboxAllow multiple valuesmust be checked.
How do I transform multiple values into multiple rows in the destination dataset¶
After configuring a field to store multiple values, you can use the explode ↗ function to separate each value into its own row. This function can be used in a SQL/Python transform of the dataset or a Contour expression.
How do I produce a field that is the concatenation of other fields?¶
Use the template field to configure the following:
- uri: display.Text1
name: Text 1
type: Text
tag: X
- uri: display.Text2
name: Text 2
type: Text
tag: Y
- uri: display.Template
name: Text 1_Text 2
type: Template
options:
inputs:
a: X
b: Y
template: '{{a}}_{{b}}'
How do I debug a failing submission?¶
When saving an object-backed form, you may see this error: Submitting failed! Please try again or contact your Palantir support..
To debug further, follow these steps:
- Right-click the page and select Inspect. Then, open the Console tab.
- Find the message starting with
Submitting failed! Reason .... - Expand the group of messages titled
eandbody. - The most common
errorNameisFormEntries:PhonographEntryParseError, which can be caused by an inconsistency between the form and dataset schema/Ontology configuration. - Expand the group of messages titled
parameters. - In the specific example of
FormEntries:PhonographEntryParseError, this will highlight the culprit field (PropertyId).
As an example, if a column/property of type String was paired with a field that allowed multiple values, the user would either need to change the type to Array<String> or update the field to only allow a single value.
Are mobile submissions supported?¶
Forms has a responsive web design and will work on mobile devices; however, Forms was not specifically designed for mobile and thus is not officially supported.
中文翻译¶
常见问题解答¶
本页讨论了一些常见问题及调试步骤,在使用 Foundry Forms 时可供参考。
除了 Foundry Forms,我还可以使用什么?¶
Foundry Forms 已不再是 Foundry 中数据录入或回写工作流的推荐方案。建议改用 Foundry Ontology 构建用户输入工作流,将相关数据结构表示为对象类型(object types),并通过操作(Actions)配置回写交互。
操作 提供了更强大、更精细的权限控制,涵盖数据的添加、编辑和删除,包括对受限视图的支持以及复杂条件权限的配置。此外,操作可由 Foundry Functions 提供支持,从而实现更具表现力的回写逻辑。
除了操作配置中内置的表单构建器,操作在 Workshop 和 Slate 中也得到原生支持,可借助全套应用构建工具打造复杂的数据录入用户体验。
操作还会自动为 Foundry API 生成 API 绑定,外部应用可通过这些绑定将数据写入 Foundry,并与 Webhook 交互,从而将数据写入外部系统或触发其他下游效果。
目前尚无弃用 Foundry Forms 的时间表,现有基于 Foundry Forms 的实现将继续得到支持。强烈建议新工作流采用基于 Ontology 的方案,且预计 Foundry Forms 不会获得新功能、增强功能或非安全相关的修复。
如何存储多个值?¶
多种字段类型允许用户选择多个值(例如 复选框、下拉菜单 和 列表)。使用 Fusion 工作表时,值会自动以数组形式存储在单个单元格中。使用对象类型时,需要进行一些额外设置:
- 在源数据集和回写数据集的模式(schema)中,相关列的类型必须为
Array<X>,其中X是String或Integer等基本类型。 - 在 Ontology 配置中,相关属性必须具有相同的基本类型
X,并且必须勾选允许多个值复选框。
如何将多个值转换为目标数据集中的多行?¶
配置字段以存储多个值后,可以使用 explode ↗ 函数将每个值拆分为单独的行。该函数可在数据集的 SQL/Python 转换或 Contour 表达式中使用。
如何生成一个由其他字段拼接而成的字段?¶
使用模板字段进行如下配置:
- uri: display.Text1
name: 文本 1
type: 文本
tag: X
- uri: display.Text2
name: 文本 2
type: 文本
tag: Y
- uri: display.Template
name: 文本 1_文本 2
type: 模板
options:
inputs:
a: X
b: Y
template: '{{a}}_{{b}}'
如何调试提交失败的问题?¶
保存基于对象的表单时,可能会看到以下错误:提交失败!请重试或联系您的 Palantir 支持人员。
要进一步调试,请按以下步骤操作:
- 右键点击页面,选择 检查。然后打开 控制台 选项卡。
- 查找以
提交失败!原因 ...开头的消息。 - 展开标题为
e和body的消息组。 - 最常见的
errorName是FormEntries:PhonographEntryParseError,这通常由表单与数据集模式/Ontology 配置之间的不一致导致。 - 展开标题为
parameters的消息组。 - 以
FormEntries:PhonographEntryParseError为例,此处会突出显示问题字段(PropertyId)。
例如,如果类型为 String 的列/属性与允许多个值的字段配对,用户需要将类型改为 Array<String>,或者将字段更新为仅允许单个值。
是否支持移动端提交?¶
表单采用响应式网页设计,可在移动设备上运行;但表单并非专门为移动端设计,因此不提供官方支持。