Array returning incorrect values

I have an array of badges, each with a status of either ‘earned’ or ‘unearned.’ The image displayed for each badge is dependent upon the status. For example, a badge that is ‘earned’ is full color while a badge that is ‘unearned’ is greyed out.

With help from many people in this community, the following is in place in my Users data sheet.
:white_check_mark:have a comma delimited list of all earned and unearned badges
:white_check_mark:have a split text column that splits it into an array
:white_check_mark:have a relation linking the array to the badge table

Here’s where things become odd.

  • There are a total of 29 possible values that correspond to either a full color badge or greyed out badge.
  • While generating the CSV, values greater than 29 appear. These appear to be concatenations of actual values. For example “18” is a legitimate value but “1818” appears as one of the values.
    Screenshot 2023-12-19 at 1.10.18 PM

The unexpected numbers get carried into the subsequent array, making this badge invisible. You can see in this view that 9 badges are displayed but that there should be 12 badges. The number of badges actually displayed per user corresponds to the number of badges with valid numbers in the CSV.

The CSV is a template column. (You can ignore the formatting difference between the first two and the subsequent 10. This is not the error).

Has anyone seen this before?
Thank you

Instead of using 1,2,3,4 use a,b,c,d… better yet use {a}, {b}, {c}, {d}… I think your code is running over itself

1 Like

Bravo! That did indeed solve the issue. Thank you for teaching me an important skill.

1 Like

@Eric_Penn nailed the issue and resolution. 1 is replacing the 1 in 1, 10, 11, and 12.
Also consider using a Make Array column instead of a Template and Split Text. It should do the same thing with one column instead of two.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.