Skip to main content
September 3, 2021
Solved

How to implement a "set" data structure in appian?

  • September 3, 2021
  • 2 replies
  • 0 views

Hello,

I would like to implement a "set" data structure in appian. 

My use case prefers a "set" data structure as opposed to a list or dictionaries, because a set only contains unique values, or in my use case, unique sets. 

I tried to search in the documentation, but to no avail. 

    Best answer by joshl

    I don't think there is a set data structure per-se, but you could implement one using a simple rule that takes in your set and the values you are trying to insert (you may need to augment the example for more robust error handling and edge cases) and returns the resulting set:

    union(
      ri!existingSet,
      ri!dataToInsert
    )

    2 replies

    joshl
    joshlAnswer
    September 3, 2021

    I don't think there is a set data structure per-se, but you could implement one using a simple rule that takes in your set and the values you are trying to insert (you may need to augment the example for more robust error handling and edge cases) and returns the resulting set:

    union(
      ri!existingSet,
      ri!dataToInsert
    )

    stefanhelzle0001
    Brainy
    September 4, 2021

    What is the purpose? I mean, the functional requirement.