How to get Data Store Entity constant information?

There is any way to get the Data Store name and entity from a data store constant?

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    No, as per my understanding the only way to view the corresponding Data Store as well as Entity Name by drilling-down on the Constant manually.

    Also we can check the Data Store Name in another way, by checking the Precedents of a constant.

    Hence as a conclusion, you cannot get the Data Store Entity Constant information via OOTB programmatic approach unless you are not building a Custom Plugin to do so, and i wouldn't recommend to build a plugin to achieve this as long as it's a critical requirement.

    Hope this will help.
  • Hi Manuelc,

    The below approach may help you.

    Which version of Appian you are using in 18.3 you can see the Data Store and Data store entity in the constant itself.

    But the below approach might help you.

    Check the precedents of the constant. You will get the Data store name. If your data store contains too many entities and hard to locate the entity, please add that datastore and constant in a patch and export it.

    now in the exported patch>content>Open the xml file with NP++ and locate the tag,

    <typedValue>
    <type>
    <name>DataStoreEntity</name>
    <namespace>www.appian.com/.../namespace>
    </type>
    <value a:id="0e4ed360-c56d-4005-b86c-5105985cf2f4@_a-0000dd8d-daf1-8000-9ba2-011c48011c48_87096"/>
    </typedValue>

     

    The bold one is UUID of DS and Red colored is DSE.

     

    Now open the Exported Patch>DataStore> Open the xml with NP++ file and search for the 0e4ed360-c56d-4005-b86c-5105985cf2f4

    You can find the detilas of the Entity name and CDT mapped to that entity.

    <entity>
    <uuid>0e4ed360-c56d-4005-b86c-5105985cf2f4</uuid>
    <name>AMS_tasks</name>
    <type>{xxx.appiancloud.com/.../type>
    </entity>

    I would Strongly Recommend using of Description while creating constant

    Entity Name--- CDT Name---Data Store Name

  • I think the question needs to be clarified. If the question is about how to create the DS Entity then you can follow below:
    Click on New->Constant.
    Specify Datastore Entity on the Type Dropdown.
    Select the Data Store Entity that you wished to be assigned to the constant.

    If you want to get the value of the DS Entity constant, you can probably get the object using the getconstantobjectbyname() function