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 301
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