IBM Support

DOORS DXL's slider function is not displaying the initial value correctly

Troubleshooting


Problem

When the label is an empty string, the slider function displays the minimum value as the initial value.

Symptom

IBM Engineering Requirements Management DOORS (DOORS) DXL's slider function takes on 5 parameters: dialog box (DB), label (string), initial value, minimum value, and maximum value.
1. When the label string is NOT empty
DB mydb = create "mydb" 
string label = "mylabel"
DBE rating = slider (mydb, label, 5, 0, 10) 
show (mydb)
image-20220207002509-3
The value indicator is at the correct position.
2. When the label string is empty
DB mydb = create "mydb" 
string label = ""
DBE rating = slider (mydb, label, 5, 0, 10) 
show (mydb)
image-20220207002540-4
The value indicator is at the WRONG position.
It should be at 5 (initial value), but it is at 0 (minimum value).
3. When the label string is set to a space
DB mydb = create "mydb" 
string label = " "
DBE rating = slider (mydb, label, 5, 0, 10) 
show (mydb)

 
image-20220207002723-5
The value indicator is at the correct position.

Cause

There is a bug in the slider function.
The slider function does not display the initial value properly when the label is an empty string.

Resolving The Problem

Until there is a patch for the DXL functionality, this issue can be worked around with the following
1. Make sure the label is not empty when passing into slider function
Change
DBE rating = slider (mydb, label, 5, 0, 10) 
to
// if a label is empty, set it to a space
if(label==""){label=" "}
DBE rating = slider (mydb, label, 5, 0, 10) 
Or
// add a space regardless the contents of label
DBE rating=slider(mydb, label+" ", 5, 0, 10)
2. Make an auxiliary function slider2, and replace slider functions with slider2 functions
DBE slider2(DB mydb, string lbl, int ini, int min, int max) {
  if (lbl=="") {
    lbl=" "
  }
  return slider(mydb, lbl, ini, min, max)
}
And then change all slider functions to slider2
For example, change
DBE rating = slider (mydb, label, 5, 0, 10) 
to
DBE rating = slider2 (mydb, label, 5, 0, 10) 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSKR2T","label":"IBM Engineering Requirements Management DOORS"},"ARM Category":[{"code":"a8m50000000CimmAAC","label":"DOORS->DXL"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
14 February 2022

UID

ibm16554134