4.6.8.2 Menu Options and Dialog Controls

Load Sample Load a sample formula. Load a saved formula. Save the current formula, including contents of Before Formula Scripts and Python Function tabs. Save the formula to another name.
 You can also load formulas directly in the column label row F(x)= cell. Select the cell, then choose Column: Fill with User Formula; or right-click in the cell and choose Load.

Origin lists all the columns of the current worksheet in the form of WCol(N): Short Name"Long Name", where N is the index of a column. You can select one of them to add to Column Formula or Before Formula Scripts so that you can use the column in your expression. Whether to add the selected column to the Column Formula edit box or the Before Formula Scripts edit box depends on where the cursor is.

WCol(N): Short Name"Long Name" You can select this menu option to add wcol(N) to Column Formula or Before Formula Scripts. N is the index of a column. Select this to open the Column Browser dialog which helps you to choose the column to add.

Origin lists all the columns of the current worksheet in the form of Col(Short Name): Long Name, such as Col(A): Time. You can select one of them to add to Column Formula or Before Formula Scripts so that you can use the column in your expression. Whether to add the selected column to the Column Formula edit box or the Before Formula Scripts edit box depends on where the cursor is.

Prefer Long Name Prefer using the long name to specify the colomn name, Col(Lone Name): short Name You can select this menu option to add Col(Long Name) to Column Formula or Before Formula Scripts. Select this to open the Column Browser dialog which helps you to choose the column to add.

This menu can be used to add functions for building the expression. You can select a function and insert it in either the Column Formula or the Before Formula Scripts edit box. Functions are inserted at the cursor.

Recent Used Functions which have been used are automatically added to this menu. Open the Search and Insert Functions dialog to search for built-in functions. Select a function to add to Column Formula or Before Formula Scripts. For more on these functions, refer to LabTalk supported functions.

The options in this menu have been supported since Origin 8.1 SR0. Use menu commands to insert variables into the Before Formula Script edit box.

 When a range variable has been added through Add Range Variable by Selection menu for the first time, an Insert Mode dialog pops up and you could select different syntax referring to a range. Available options are Column Notation: Col(A), Long Name : A, Short Name : A and Index : wcol(1).

Example: Inserting SYSTEM variables into your column formula

The workbook can store four numeric (double) values and four string variable values. These pre-defined SYSTEM variables can be used, among other things, to store key workbook-specific values that you might use in column values calculations.

1. Begin by opening a fresh workbook window. This would be workbook that you intend to use for your column values calculations.
2. With this workbook window active, open the Script Window (Window: Script Window), type the following and press Enter.
page.v1=1.117
3. Right-click on the worksheet column you want to use in calculations and choose Set Column Values.
4. Let's assume we want to multiply our column A values by our new "v1" variable value of 1.117. Begin by entering "A" in the top, column formula box.
6. Expand the System Formula node, highlight your variable v1 (and its value of 1.117) and click Insert, then Close. Note that the Set Values dialog now displays the following expression in the Before Formula Scripts panel.
double d1 = page.info.SYSTEM.FORMULA.V1;
7. The value stored in v1 has now been assigned to a variable named d1 of type double. In order to use this to multiply our column A values by 1.117, we have to add it to the top panel expression:
A * d1
8. Click Apply or OK to perform your column calculation. Note that should you save the book as a separate window (apart from the project), the variable value will be saved in the book.
 Note that another logical method for defining and saving variables for use in Set Values column formulas is to use the Before Formula Scripts panel in Set Values.

Direct Edit Formula Cell This option is enabled by default. Checking this option allows direct editing of the formula in the cell. This option is available when Direct Edit Formula Cell is disabled. Selecting this option opens the Formula Text dialog box, prompting you to enter the text you want to be displayed in the formula cell in the F(x) label row. Note that if the Formula Text box is left empty, the column formula is displayed in the formula cell. Hint: If you want the formula cell to display nothing, you can type a space in the Formula Text box. When checked, text in destination columns will be kept instead of becoming missing values when doing calculations.

Range/Column controls

Define the range of the values whose values will be set with the expression.

If you have selected part of a column(multiple columns) before opening the Set Values dialog box, the starting and ending row indices will be automatically displayed in the Row (i): From and To boxes (selecting an entire column will set both boxes to <auto>). Please note that non-contiguous range selection is not supported. To change the range, you can overwrite the values in the From and To boxes.

Specify the columns whose values will be set with the expression. This control is only available when set multiple columns values.

If you have selected multiple columns before opening the Set Values dialog box, the starting and ending columns indices will be automatically displayed in the Col (j): From and To boxes. Please note that non-contiguous columns are not supported. To change the columns, you can overwrite the values in the From and To boxes.

Target Column

This non-editable field identifies the column or columns to which the Column Formula and/or Before Formula Scripts expression(s) should apply.

Column First/Next/Prev/Last

You can use this group of buttons to switch from one column to another. This allows you to use the Set Values dialog on multiple columns without closing the dialog.

Column Formula

You can add a single line expression in this edit box for generating data. Functions, conditional operator and variables can be used here.

Recalculate

Recalculate Controls recalculation of Set Values expressions: None Auto Manual For more information, see: Recalculating Analysis Results

Buttons

 Search and Insert Functions dialog Open the Search and Insert Functions dialog by clicking button. Switch to the column properties dialog by clicking button. Set values with the expression without closing the dialog box. Close the dialog box and do nothing. Set values with the expression and then close the dialog box. Show or hide the Before Formula Scripts panel.

Before Formula Scripts

You can enter multi-line LabTalk scripts in this edit box and the scripts will be executed before the expression in Column Formula edit box is executed. You can click the Show/Hide Scripts button to show/hide this edit box.

Search and Insert Functions

To search for a function, first enter keywords in function search input box and all related functions will be listed with function names and descriptions. You can then navigate to desired function and add the function to Set Values dialog box by double clicking the function name. To view more details of that function, you can go the corresponding function page by click the description part of the function.