Here’s a fun one with some honestly unexpected behavior:
GOAL:
To create a filtered Table view (“FilterTable”) using a Slice (“FilterSlice”) which uses the following row filter expression:
IN(TEXT([ProjectNumber]), SPLIT(INDEX(CurrentUser[UserPinnedProjects], 1), ","))
The “ProjectNumber” column is the key of the FilterSlice Table and the “UserPinnedProjects” column stores and EnumList of pinned ProjectNumber’s delimited by a “,”.
PROBLEM:
The resulting FilterTable will at first show all of the correct rows, but then seemingly “stack” them on top of one another. Let me demonstrate with some images.
PROCESS:
The workflow involves using a “PIN” action and “UNPIN” action to respectively append or remove ProjectNumber’s from a users pinned projects.
This image shows me “pinning” project #'s 000000, 150101, 150104, and 150107 in the “MainTable” view by clicking a the blank star resulting in a filled star showing that it’s pinned. So far, so good. I can even toggle the star to unpin it. The underlying data in the spreadsheet is simply “000000,150101,150104,150107” in the current users (ya boy) UserPinnedProjects column.
.
.
However, if you wait long enough, all of the filtered rows will just collapse into one row:
.
.
Toggling the “Unpin” star will start to unravel the list item by item. By this I mean, unpinning “150101” here yields “150104” and so on until the list is depleted. For the life of me, I can’t seem to figure out what is causing this…regressive collapse? All the while, the responsible data looks fine. Nothing changes.
Solved! Go to Solution.
Your expression (reformatted):
(
SELECT(
CurrentUser[UserPinnedProjects],
INDEX(CurrentUser[UserEmail], 1) = [UserEmail]
)
+ LIST(TEXT([ProjectNumber]))
- LIST("")
)
Try instead:
(
SPLIT(("" & CurrentUser[UserPinnedProjects]), " , "),
+ LIST(TEXT([ProjectNumber]))
- LIST("")
)
BTW, INDEX(CurrentUser[UserEmail], 1) = [UserEmail]
shouldn’t be needed in that SELECT() if the CurrentUser slice is setup to include only the current user.
User | Count |
---|---|
35 | |
35 | |
28 | |
23 | |
18 |