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.
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!
User | Count |
---|---|
19 | |
9 | |
8 | |
6 | |
5 |