阅读和查看 Automation Anywhere 文档

Automation Anywhere Automation 360

关闭内容

内容

打开内容

使用 EntryList

  • 已更新:2021/05/07

    使用 EntryList

    通过 EntryList ,您可以通过 bot 设计器接受任意数量的参数。参数结构在 Automation 360 操作中定义。

    示例:EntryList

    以下示例说明了如何创建一个名为 village pair的参数。

    @BotCommand
    @CommandPkg(label = "EntryList example", description = "EntryList example", icon = "sample.svg", name = "entryListExample")
    public class EntryListExample {
    	// UI display for ENTRYLIST 1.1, the linking is done based on the ENTRYLIST title.
    	// This should be added as a child of the ENTRYLIST, however it should not be part of options.
    	// The EntryList does not need a setter or Inject as the value is provided inside the ENTRYLIST.
    	@Idx(index = "1.3", type = TEXT, name = "NAME")
    	@Pkg(label = "Name", default_value_type = DataType.STRING)
    	@NotEmpty
    	private String name;
    	//Linked to 1.2 through title.
    	@Idx(index = "1.4", type = TEXT, name = "VILLAGE")
    	@Pkg(label = "village", default_value_type = STRING)
    	private String city;
    	@Execute
    	public void setParameter(
    			// Add the entryList, the values are accepted as a list of values.
    			// Provide the column header for the tabular display of accepted entries.
    			// In Pkg, provide a unique title.
    			// Provide Idx for each option separately, this is needed to
    			// have the correct UI type when the entry form is presented.
    			// Add only columns to options, you cannot add their definitions.
    			@Idx(index = "1", type = ENTRYLIST, options = {
    					@Idx.Option(index = "1.1", pkg = @Pkg(title = "NAME", label = "Name")),
    					@Idx.Option(index = "1.2", pkg = @Pkg(title = "VILLAGE", label = "village")),
    			})
    			//Label that is desplayed in the UI
    			@Pkg(label = "Provide name value entries")
    			//Header of the entry form
    			@EntryListLabel(value = "Provide entry")
    			//Button label which displays the entry form
    			@EntryListAddButtonLabel(value = "Add entry")
    			//Unique rule for the column, this value is the column TITLE. 
    			@EntryListEntryUnique(value = "NAME")
    			//Message to dispaly in the table when no entries are present.
    			@EntryListEmptyLabel(value = "No parameters added")
    					List<Value> entryList) {
    
    	}

    下面是 EntryList 的另一个示例,定义 EntryList 的值 使用。

    //Entry list//
    @Idx(index = "1", type = ENTRYLIST, options = {
          @Idx.Option(index = "1.1", pkg = @Pkg(title = HEADER_ENABLED, label = "[[HEADER1]]")),
          @Idx.Option(index = "1.2", pkg = @Pkg(title = HEADER_NAME, label = "[[HEADER1]]")),
          @Idx.Option(index = "1.3", pkg = @Pkg(title = HEADER_VALUE, label = "[[HEARER3]]"))
    })
    @Pkg(label = "customHeaderslabel")
    @EntryListLabel(value = "customHeaderlabel")
    @EntryListAddButtonLabel(value = "add.header")
    @EntryListEmptyLabel(value = "no.header")
    @Inject
    List<Value> customHeaders;
    
    发送反馈