Slider Arrow Icon
Back to SmartSuite blog
Assigning Numerical Values for Single Selects in SmartSuite

Assigning Numerical Values for Single Selects in SmartSuite

10 minutes

March 14, 2023

Today, we're diving into an intriguing aspect of data management that'll get your sheets calculating like a charm - assigning numerical values to single selects in SmartSuite. 🚀

The Magic of Single Select Fields with Numeric Values

Imagine having a chest of drawers where each one is labeled with different contents. Similarly, in the digital universe, we have these cool things called single select fields. They usually house any arbitrary value without much fuss. But, when you have a drawer (or a field, in this case) that's supposed to contain something specific—let's say socks—you want to ensure you know exactly how many pairs you have, right?

Now, our single select fields can transcend their arbitrary nature and truly represent quantifiable amounts. This magic trick can help us perform wizardry with formulas and derive values that make sense in the real world.

Real-World Applications: A Manufacturing Tale

Let's take a quick journey to a client of ours, a manufacturer with a keen eye on inventory and a sharp mind for pricing. For this expert, it's critical to track material consumption with precision. Not just to keep the warehouse in check, but also to accurately price and quote for customers.

Why the Lowest Common Denominator Matters

Consider this: our client has a plethora of products and projects that come in various shapes and sizes. How do you standardize units of measurement across different dimensions? The answer lies in the simplicity of finding the lowest common denominator—square inches, for instance.

Let's decode this with an example. Think of an invoice line or an inventory line, tagged to a specific product. Measurements could range from each, square inch, square foot, and beyond. But by reducing them all to square inches, we're setting a stage where we can play with numbers in harmony.

Behind the Scenes: Assigning Values

Are you ready to assign some values to these measurements? Of course, you are.

We'll go through a slight modification of the field settings. At first glance, this little nugget of functionality might be playing hide and seek, but once expanded, it unveils options that bridge the gap between select labels and tangible numbers.

This is manual territory—no formulas, no conditionality. It's a clear-cut way to assign numerical values, ensuring we maintain unity, like keeping measurements within the same unit, say, square inches for our example.

A square foot, for those curious, squashes into 144 square inches (12x12). This sets the stage for consistency as we cascade down the measurement spectrum.

Witness the Calculation Magic

Roll up your sleeves as we bring these assigned values into action. Imagine a scenario: a unit of measurement like a square foot meets a quantity, and we need to calculate the total material used.

function calculateTotalMaterial(quantity, unitOfMeasurement) {return quantity * numericValue(unitOfMeasurement);}

But wait! If we try multiplying the fields directly, we're met with an error. It seems that the single select field is cloaked in its label, and we need to unveil its numeric core. Enter the numeric_value function—a beacon that calls forth those hidden numbers so we can multiply seamlessly.

With that, we have our formula:

Voilà, we now have a 'Total Material' field that multiplies our unit of measurement by the quantity, adjusting the value as we toggle between different units—like switching from square feet to square yards.

Your Turn to Cast the Spell

As we wrap up this captivating session, I'm eager to find out how you'll weave this formula magic into your projects. Will you measure coffee beans, plan events, track mileage? The possibilities are truly boundless.

To experience SmartSuite's key benefits for yourself, start a free trial today and explore its intuitive work management platform.