Svenska Not logged in: Log in | Register

2022-03-18:

Data from Result Modules

Updated: 2022-03-18

If you use a Result Module to calculate results for the list, you activate out data from the module by checking Data from result module in a list entry. Not all types of list entries supports data from a result module; basically it calculates a time, a status, and a point, so only types related to these quantities and some deduced quantities, such as place and time after, supports data from a result module.

In addition there is another way to print out data from the result module in the list. In your code, you may assign values to the variables OutputTimes[] and OutputNumbers[], which you can pick up in the list through the types Result Module: Time and Result Module: Number, respectively.

Result Module: Time

This type formats the number in OutputTimes[index] (seconds), as a time. You specify which index to use in Index in OutputTimes[index].

Result Module: Number

This type formats the number in OutputNumbers[index] as a number. But you can also use the number to select any text string: In the field Custom text, type @ followed by a semicolon separated list of values. Then OutputNumbers[index] will be used as a (zero based) index to select one of the strings. If a string in the list contains the symbol X, it will be replaced by the number. If the last string in the list contains X, this string will be used also for any number not covered by the list. Thus you can use the string @;X to make 0 blank and print the number otherwise. If instead the last string starts with the @, that last string will be used as default for all values not specified in the list.

Example

Suppose that you, in the rule for time calculation, in your result module enter:

OutputNumbers[0] = Place - 1;
return Time;

Then you select this result module in the list properties, create a list entry and select Result Module: Number, puts the index to 0 (default), and in the field Custom text type @Gold;Silver;Bronze.

The outcome is that the winners get the text Gold, those at a second place get Silver and those at a third place get Bronze. Other gets nothing.

If you instead type @Gold;Silver;Bronze;X competitors with place N (outside the winner&[Unknown function 039;s]stand) get the number N-1 printed. (If you prefer the actual place you need to change the result module and replace Place-1 with Place and change the text to @;Gold;Silver;Bronze;X).

If instead you use the string @Winner;@@Looser, you would write Looser for everyone not winning and – as a side effect – excel in rudeness.

Comments

Custom Text String ‘@;X’ Not Working

2025-10-29 14:19:00 av Mike Avery

In early 2025 the custom list “Kinder, Gentler Results” (on the list download page) was developed for linear, point-to-point events that listed competitors in the order of the number of controls correctly found, then by time of their run.

In that custom list, the competitor’s place was calculated in the associated result module and transferred back to MeOS as OutputNumber[1]. In the result list definition, OutputNumber[1] was used to show the competitor’s place, using the custom text string ‘@;X’ to suppress displaying and printing 0 as the place for all competitors who missed a control.

This no longer seems to work in v4.1.1702, as the Kinder, Gentler Results list outputs all places, including those who missed at least one control and didn’t place, as ;1, ;2, ;3…;0, ;0…

To make sure, I opened an event in v4.0.1578 (released version at the time of the list development) and displayed the results using the custom Kinder, Gentler Results list and the results displayed as expected – all valid places being displayed and those with missed controls as blanks in the place field.

Is there a new approach that should be used to achieve this effect on displayed/printed output of OutputNumber[]s that hasn't made it into the documentation? Thanks.

String formatting

2025-10-29 15:08:35 av Erik Melin

The change is not intentional. I will try to restore the old behavior.


To post a comment, you need to log in.