Skip to main content
August 29, 2023
Solved

Data type

  • August 29, 2023
  • 2 replies
  • 0 views

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

    Best answer by stefanhelzle0001

    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
    August 29, 2023

    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
    August 29, 2023

    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.