- 入门指南
- 在开始之前
- 如何
- 通知
- 设计应用程序
- 事件和规则
- 在应用程序中利用 RPA
- 在应用程序中利用实体
- 在应用程序中利用队列
- 应用程序生命周期管理 (ALM)
- 基本故障排除指南
使用文件选取器控件上传文件
使用存储桶
先决条件
在将文件控件添加到应用程序之前,您必须在 Orchestrator 中配置存储桶并将其导入到应用程序中。
有关如何实现此目的的更多信息,请参阅从 Orchestrator 引用存储桶。
在您要将“上传的文件名”作为输入传递给流程的地方,不应直接使用上传的文件名设置流程输入参数,而应使用应用程序变量来设置上传的文件名。然后,您可以使用 app 变量执行流程参数的输入覆盖,以将上传的文件名传递给流程。
程序
-
转到要添加文件控件的应用程序。
-
转到“添加控件” >“输入控件”,然后将新的“文件选取器”控件添加到您的应用程序。
-
3.5 根据需要配置控件的样式。
3.1 选择一个最大文件大小。
3.2 使用以下格式填写“允许的文件类型”字段:
.jpg, .pdf, .png。3.3 在“助手”文本字段中填写要在运行时在控件上显示的文本。
3.4 根据需要配置“其他属性”部分。
3.5 Configure the style of the control according to your needs. For short tips on how to design an app, see General User Experience Guidelines.
-
转到“添加新控件”>“输入控件”,然后在应用程序中的“文件选取器”控件下方添加一个新的“按钮”控件,并将其重命名为“上传” 。
-
在新的“按钮”控件上,转到“事件”>“创建规则” ,然后为此控件创建一个“上传文件到存储桶”规则。
-
配置“上传文件到存储桶”规则。
6.1 在“要上传的文件”字段中添加文件“选取器”控件。
6.2 添加在“先决条件”中导入的存储桶。
6.3 To make sure that files do not get overwritten, we recommend keeping the Auto-generate name box checked. If you want to create a name by yourself, uncheck the Auto-generate name box. You can create a specific file name format using
Concatfunctions and add uniqueness to filenames using theguidfunction. Make sure that filenames are unique so that they are not overwritten with files with the same name.您可以使用以下示例生成名称:
concat(filenamewithouttype,"_",guid(),filetype)concat("Photo","_",guid(),filetype)
6.4 在“完成后”部分将上传的文件名设置为应用程序变量。要添加文件名,请将“上传的文件名”拖放到“值”字段中。通过这种方式,可以将文件名发送到自动化或用于下载文件。
使用实体
先决条件
Before including a file control into your application, you must have an entity in Data Service and imported in your application.For more information how to achieve this, see Referencing an Entity in your App.
程序
-
转到要添加文件控件的应用程序。
-
转到“添加控件” >“输入控件”,然后将新的“文件选取器”控件添加到您的应用程序。
-
3.5 根据需要配置控件的样式。
3.1 选择一个最大文件大小。
3.2 使用以下格式填写“允许的文件类型”字段:
.jpg, .pdf, .png。3.3 在“助手”文本字段中填写要在运行时在控件上显示的文本。
3.4 根据需要配置“其他属性”部分。
3.5 Configure the style of the control according to your needs. For short tips on how to design an app, see General User Experience Guidelines.
-
转到“添加新控件”>“输入控件”,然后在应用程序中的“文件选取器”控件下方添加一个新的“按钮”控件,并将其重命名为“上传” 。
-
在新的“按钮”控件上,转到“事件”>“创建规则”,然后为此控件创建“创建/更新实体记录”规则。
-
配置“创建/更新实体记录”规则。确保在“应创建/更新哪个实体记录”字段中添加包含映像的实体(在“先决条件”期间配置)。
-