How to Use Input Property Controls in Spotfire Text Areas

Welcome to week four of learning to use property controls. So far, I have covered drop-downs, list boxes, and list box (multiple select). Today we cover two different ways to use input property controls. If you’re in oil and gas, input property controls will be your go-to for creating type curves in reservoir engineering workflows. Read on to learn more about creating input property controls in Spotfire text areas.

Blog or Video

Today’s Examples

Today’s post will have three examples. First, we’ll use production data and an oil price in a property control to caluclate revenue. Then, I’ll link to an article that goes into creating types curves with property controls in detail. Lastly, I’ll demonstrate how to use input property controls in other places, like visualization titles, so you can change the title on visualizations throughout the analysis with one modification.

Creating the Property Control

Let’s begin by creating the property control. Then, we’ll write an expression on the axis of a bar chart, and you’ll be able to see the visualization update with each change to the property control.

  1. First, add a Text Area to your page.
  2. Right-click on the Text Area and select Edit HTML. You can also select Edit Text Area, but once I learned to use HTML and avoid the GUI, I stopped using Edit Text Area.
  3. Click the Insert Property Control button.
  4. Then, select Input field.
  5. Click the New button.
  6. Name the property control and set the data type for the data you are working with. I will name mine “OilPrice”, and the data type will be real because I will enter a value that has decimals. The value entered now can be any value. You’ll be able to change it later.
  7. Click OK until you are out of all dialogs.

Next, we will connect the property control to the y-axis of a bar chart in order to calculate revenue from oil production using the value in the property control.

Connecting the Property Control

Because this use case is so simple, you may either right-click on the y-axis, as if you were just going to add or change the column, as shown below. Or, you can right-click and select custom expression. They both work.

Type in the dollar sign and an open squiggly bracket in order to engage with the property control menu.

Sum([Oil Prod]) * ${OilPrice} as [Revenue]
Sum([Oil Prod]) * ${OilPrice}

Hit play to see the finished product work. Note, the bars aren’t changing height, but the values on the y-axis are changing and the Revenue calculation is updating.

Using Property Controls in Vis Titles

You can also use input property controls to control visualization titles. I have created another input property control called “Field”. I created this property control in the exact same way as the first, except it is a string data type. Now, I will use this property control to set the title in my visualization.

While this might not look terribly impressive, imagine you have a DXP with 50 visualizations and you need to change the title in all of them. This allows you to do so by typing the new name once and only once.

Detailed Steps

  1. Right-click on the visualization and go to Properties
  2. Go to the General menu
  3. Click the Edit button
  4. Search for the property name and select it.
  5. Enter in any additional text as needed.

Hit play to see the title update.

Using Input Controls To Create Type Curves

The example above is very simple. However, property controls are used EXTENSIVELY in oil and gas to create type curves. They allow engineers to change a variety of parameters to generate the correct curve. In the screenshot below, I have set up 3 text areas to generate 3 different type curves that are calculated with a data function and then used on visualizations. This required setting up 48 property controls. Check out this post for the details.

And now you how to use input property controls in Spotfire text areas. Next week, I’ll cover how to use input property controls with multiple lines. I have a great use case for that.

Spotfire Version

Content create with Spotfire 10.3.

Other Sweet Content

5 thoughts on “How to Use Input Property Controls in Spotfire Text Areas”

  1. Pingback: Using Input (multiple lines) Property Controls in Spotfire Text Areas » The Analytics Corner

  2. Pingback: How to Connect A Spotfire Display Name To A Property Control » The Analytics Corner

  3. Pingback: Using Slider Property Controls in Spotfire Text Areas » The Analytics Corner

  4. Hi Julie, is is possible to use one property control for two columns with different aggregation method – sum and uniquecount?

    1. You can use one property control (list box multi select), and then just use different aggregations when you write the expression. Should work just fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.