Skip to main content
Inspiring
Aug 29, 2023 7:44 AM UTC
Solved

Data type

Hi Team,

What data type should be used if I want to store the data like this

id,users

1, user1

2, user1; {user2,user3}

3, user1; {user2,user3}; user4

Operations:

We can remove the users from list

input: id, username -> 2,user1

output: 2,{user2, user3}

input: id, username -> 3,user3

output: 3, user1; {user2}; user4

    stefanhelzle0001
    Brainy
    Aug 29, 2023 9:43 AM UTC

    Are you talking about storing the data to database? If yes, a single field cannot store multiple values. A basic data structure could be

    primary_key, id, user

    And the data

    1, 2, user1

    2, 2, user2

    3, 2, user4

    4,42, user8

    2 replies

    stefanhelzle0001
    Brainy
    Aug 29, 2023 9:43 AM UTC

    Are you talking about storing the data to database? If yes, a single field cannot store multiple values. A basic data structure could be

    primary_key, id, user

    And the data

    1, 2, user1

    2, 2, user2

    3, 2, user4

    4,42, user8

    mathieud0001
    Genius
    Aug 29, 2023 11:02 AM UTC

    In that actual format you posted, only text will work.

    But as discussed in your previous thread - https://community.appian.com/discussions/f/new-to-appian/29769/text-logic - I would recommend not storing users in this format which has nested lists. You should flatten that list and just store a list of users as suggested by Stefan.