Segregate Entities from array of Entity data

Certified Associate Developer

Yeloow,

I am currently working in a use case,

I have an array of Entity data where entites from different datastores will be inside this array,

I want to segregate or group the entities by their datastore so I noticed one thing while trying this out,

  • [Data Store Entity:"xxxxxxxxx-xxxxxxxxf-9143-xxxxx8c102b00@4872"](Data Store Entity)
      • [Data Store Entity:"xxxxxxxxx-xxxxx-43a9-a20d-3xxxx744b9aae@4872"](Data Store Entity)
          • [Data Store Entity:"xxxxxxxxxx-xxxxx-4adc-b46f-axxxxa5990bd@6308"](Data Store Entity)
              • [Data Store Entity:"xxxxxxxxxx-xxxxxxx-4c81-9ddc-axxxx0d18e9@6308"](Data Store Entity)

              after the @ every entities belong to same Datastore have the same 4 digit number so I assume entites belong to same Data store have these 4 digit number common, is my assumption right ? can any Appian legend confirm this Wink.

               

                Discussion posts and replies are publicly visible

              • It is my understanding that those @ values will remain consistent within the same environment, for any Data Entity under the same Data Source.  But, those Entities under the Data Source can have different structures, so grouping on this value may not provide benefit depending on your needs.  Essentially, this is just a reference # for which Data Store the Entity resides under:  

                • [Data Store Entity:"DATA_ENTITY_UUID@PARENT_DATA_STORE_REFERENCE"](Data Store Entity)

                But, this reference # is neither the ID or UUID of the parent Data Store.  In my environment, one reference is "xyx@51776" where the Data Store ID is "500113" and UUID is "_a-0000dc00-xyz.."

                But, if it helps for your needs, you can extract either part of the string to retrieve the Entity UUID or Parent Data Store Reference (which does not link directly to a DS, AFAIK)..

                  a!flatten(
                    a!forEach(
                      items: local!entities,
                      /*expression: extract(tostring(fv!item),"@","""")*/  /* Uncomment for DS reference # */
                      expression: extract(tostring(fv!item),"","@") /* Entity UUID */
                    )
                  )

                You will note that if you search for the reference number in /design by ID or UUID, within an application that the DS resides, it is returned.  However, if you search the overall /design environment objects for this reference #, it is NOT returned (tested on Appian 24.1).