Possible to store all data store entities in local variables?

Is there any way to accumulate all the data store entities of all the data stores that are there on an environment into a local variable. Requirement is to build a custom picker using which a data store entity can be selected and the user is able to download the data of the selected data store entity in CSV/Excel format. Downloading the data i am aware of , problem is accumulating all the data store entities in a local variable. Any suggestions are welcome.
Thanks in advance.

OriginalPostID-215302

OriginalPostID-215302

  Discussion posts and replies are publicly visible

Parents
  • @yagyadeepk Hi, AFAIK there isn't really a clean way of doing this.

    I guess, following could be an option:

    Step - 1: Build a table that stores the names of constants that hold references to data store entities (and their associated formatted names if needed. For instance, cons!MY_APP_DATA_STORE_ENITY_EMPLOYEE might need to be represented as Employee).

    Step - 2: Build a custom picker which searches through the constant names (or its associated formatted names) stored in the table as discussed above. In the 'saveInto' of the custom picker component, invoke an expression rule that makes use of a!queryEntity() wherein the 'entity' attribute will be driven dynamically based on the value chosen in the picker component. You may want to depend on a plugin (for instance, Get Constant By Name plugin) for deriving the constant based on the text value.

    The only pain point here is, you need to update the table each and every-time when a new data store entity is added.

    An other option might be to write a custom plugin that derives all the data store entities in the given Appian instance, and in this case I would suggest taking a look at the capabilities being offered by API.

    Let's see what other practitioners opines on this.
Reply
  • @yagyadeepk Hi, AFAIK there isn't really a clean way of doing this.

    I guess, following could be an option:

    Step - 1: Build a table that stores the names of constants that hold references to data store entities (and their associated formatted names if needed. For instance, cons!MY_APP_DATA_STORE_ENITY_EMPLOYEE might need to be represented as Employee).

    Step - 2: Build a custom picker which searches through the constant names (or its associated formatted names) stored in the table as discussed above. In the 'saveInto' of the custom picker component, invoke an expression rule that makes use of a!queryEntity() wherein the 'entity' attribute will be driven dynamically based on the value chosen in the picker component. You may want to depend on a plugin (for instance, Get Constant By Name plugin) for deriving the constant based on the text value.

    The only pain point here is, you need to update the table each and every-time when a new data store entity is added.

    An other option might be to write a custom plugin that derives all the data store entities in the given Appian instance, and in this case I would suggest taking a look at the capabilities being offered by API.

    Let's see what other practitioners opines on this.
Children
No Data