Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Action to add or remove an item from EnumList

In the comments module of my app, I have an EnumList column named "ReadBy" which should contain the list of users who have already read the comment.

At the moment, my action uses this function to mark the message as read:

ReadBy=USEREMAIL()

Obviously, that doesn't work, since it doesn't add the last reader to the list, but replaces the list completely.

How could I modify this expression so that the data is added to the list ?

And while we're at it, what should be the expression for a reverse action (mark as unread) that would remove the user from the list ?

Thanks for helping me and sorry for my newbie questions.

Solved Solved
0 3 288
1 ACCEPTED SOLUTION

Please try in the action

For adding an email through action to a list, please set the [ReadBy] column in the ( mark as read) action as

Readby = [Readby]+LIST(USEREMAIL())

For removing an email through action to a list, please set the [ReadBy] column in the ( mark as unread) action as

Readby = [Readby]- LIST(USEREMAIL())

[ReadBy] is assumed to be an enumlist column with base type as "Email"

View solution in original post

3 REPLIES 3

Please try in the action

For adding an email through action to a list, please set the [ReadBy] column in the ( mark as read) action as

Readby = [Readby]+LIST(USEREMAIL())

For removing an email through action to a list, please set the [ReadBy] column in the ( mark as unread) action as

Readby = [Readby]- LIST(USEREMAIL())

[ReadBy] is assumed to be an enumlist column with base type as "Email"

Works perfectly ! Thanks !

You are welcome.

Top Labels in this Space