Multiply all items in a list by n

Hi,

Can anyone advise how I can multiply every item in a list by a constant before I display it using the chartjs plugin? I have percentages stored as their decimal value (e.g. 0.05) but for frustrating formatting limitations in the chart plugin I need to load 0.05 from the list as 5.

Note I don’t want to have to write back to the database, and I don’t want to create a specific workflow action to achieve this. I would like to load and adjust the list in real time as I select the values for the chart plugin. So instead of [do a search for…], I’m trying to get something like [do a search for…] * 100.

I have tried a bunch of different approaches and none are working. I suspect (and hope) it’s super simple…

Thanks!

Floppy plugin has math features for lists

1 Like

Thanks @troy.roberge, appreciate the suggestion. This worked, although I’ve got to say I’m kind of staggered I couldn’t do this natively…

1 Like

Welcome to the @keith cinematic plugin universe, where long-standing problems are solved by someone who knows what Bubblers need, and cares enough to solve those problems.

Note that “List Math” is available both client and server side. Floppy is here: FLOPPY: Plugin for localStorage, sessionStorage, IndexedDB storage, List Creation/Manipulation, Iteration, and More! Now with even more video docs!

@troy.roberge thanks for the shoutout.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.