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

  • @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.
  • @yagyadeepk - there is a shared component available called Entity picker sail component.

    https://forum.appian.com/suite/tempo/records/item/lMBCLGOdlMUpdGVqW3dQaIKmclBmvvNEj8vu_cjb7T-5YiPr4Fu8ly5Yj1s09uenE4RYzA8zKyx7eiUhu-kLnO0lKs20RB-dzMeyqcxAS6J9TUt9A/view/summary

    I am not sure how it works as I have not used it. It might help you.
  • I would like to make a confirmation with respect to the Shared Component mentioned above. To the best of my knowledge, it may be ruled out as an option. Because the use-case here talks about accumulating the Data Store Entities from all the Datasources in the given Appian instance into a storage location and searching through them, whereas the Shared Component is all about querying the Data Store Entity that is inputted to it. In-fact, querying the Entities comes at a later stage, that is, only after searching through the available Data Store Entities and choosing one of them thereafter.