Filtered Table View "Stacking" Row Values

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.


.
.
When we switch over to FilterTable, everything also appears as hoped for:

3X_c_f_cf15c811ec59b93f4cd3164b499ce8403ea6f2a6.jpeg
.
.
However, if you wait long enough, all of the filtered rows will just collapse into one row:

3X_4_3_439308bae63dce202c064b6ca4e30abb136dd3a3.jpeg
.
.
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.

3X_b_c_bce6090c13ef4a331a9adebda3b2e96b854ca531.jpeg

Solved Solved
0 6 295
1 ACCEPTED 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.

View solution in original post

6 REPLIES 6

Steve
Platinum 4
Platinum 4

Instead of this:

SPLIT(INDEX(CurrentUser[UserPinnedProjects], 1), ",")

Try this:

SPLIT(("" & CurrentUser[UserPinnedProjects]), " , ")

Assuming the EnumList’s delimiter is the default space-comma-space.

No dice, Steve; I get similar results. The reason I’m using just a “,” comma instead of " , " space-comma-space is because I noticed that my pinning action to append another number to the list of pinned projects destroys whatever delimiter there is and instead replaces the delimiter with “,”. So if I delimit with “:” for example “aa:ab:ac:ad” becomes “aa,ab,ac:ad” for reasons unknown to me.

For what it’s worth, the pinning fuction does something like this:

SELECT(CurrentUser[UserPinnedProjects], INDEX(CurrentUser[UserEmail], 1) = [UserEmail]) + LIST(TEXT([ProjectNumber])) - LIST("")

You’ll notice that I use the INDEX(CurrentUser[UserEmail], 1) construct just to pull info from the current users row. That’s all that is. I’m guessing the LIST() function is forcing any delimiter to “,” after adding the list.

Please post a screenshot of the configuration of the UserPinnedProjects column that includes everything down to and including the Type Details section.

You got it!

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.

Applied your suggestions on the pinning function and to the slice filter and it works like a charm. Thank you for all your fantastic help and guidance, Steve! Have a great weekend!

Top Labels in this Space