I have a problem using an Arcade expression to create categories in order to style the features symbols in a web map on ArcGIS Online
I want to style a feature symbol if a field value is greater than of 0. If the field value is 0, I want to use another field values as categories.
I am using this Arcade expression:
<SPAN class="keyword token">function</SPAN> <SPAN class="token function">get_symbol_cat</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">.</SPAN>matelas_quantite <SPAN class="operator token">></SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN> <SPAN class="string token">"matelas"</SPAN>
<SPAN class="punctuation token">}</SPAN> <SPAN class="keyword token">else</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</SPAN> <SPAN class="token function">Text</SPAN><SPAN class="punctuation token">(</SPAN>$feature<SPAN class="punctuation token">.</SPAN>collectefaite<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="token function">get_symbol_cat</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>However, when I go to the symbol styling menu, there is only the category "matelas" and "other" available. The categories of $feature.collectefaite are not available.

This is really weird, because if I slightly modify the Arcade expression using greather than 1 instead of 0. It's working.
function get_symbol_cat() {
if ($feature.matelas_quantite > 1) {
return "matelas"
} else {
return Text($feature.collectefaite)
}
}
get_symbol_cat()
Any idea what could be wrong?
Thank you
P.S.: There is 385 features in the layer, 135 where $feature.matelas_quantite is greater than 0 and 250 where $feature.matelas_quantite is equal to 0.