Help between Notion users

It's free & easy

### Vote and select answers

Receive points, vote and give the solution

1vote

# My slice function doesn't work in Notion, why ?

Hello !
I want to create a progression bar with a slice function to make it more pleasing to watch. I've watched many videos and every time it shows me the error "Argument of type text does not satisfy function slice." whilst i use the exacts same symbols as every video i watch but for some reason it doesn't work for me.

Just in case here are the two formula's i've tried using:

``if(prop("Progress") < 0.1, "♥♡♡♡♡♡♡♡♡♡", slice("♥♥♥♥♥♥♥♥♥♥", 0, 10 * prop("Progress")) + slice("♡♡♡♡♡♡♡♡♡♡", 10 * prop("Progress"))) + " " + format(floor(100 * prop("Progress"))) + "%"``
``slice("♥♥♥♥♥♥♥♥♥♥", 0, floor(prop("Progress")) * 10) + slice("♡♡♡♡♡♡♡♡♡♡", 0, 10-floor(prop("Progress"))*10) + " " format(prop("Progress"))*100) + "%”``

Hope someone will be able to help me because it's been a couple days and i'm going crazy.

Thanks !

1vote

ABCDE Points460

I just had this problem, I think they updated the notion's formulas. I used the substring formula instead of slice.
Here's the formula that I used

``substring("★★★★★★★★★★", 0, round(10*prop("Pourcentage"))) + substring("☆☆☆☆☆☆☆☆☆☆", round(10 * prop("Pourcentage"))) + "   " + 100*prop("Pourcentage") +"%"``

0vote

### iezwiex commented Sep 13, 2023

It worked ! Thank you so so much for your answer :)

0vote

### sheanichole commented Oct 8, 2023

Thank you, this also helped me fix my formula!