sudden change in string value during a browse value change

Discussão em 'StackOverflow' iniciado por fdantas, Novembro 5, 2015.

  1. fdantas

    fdantas Administrator Moderador

    During a Value-Change inside a browse, my string value suddenly changes, specifically the string(9) will change to string(0).

    sample:

    in my combo-box, i used a list-item-pair with following code:

    cb-name:LIST-ITEM-PAIRS = ?.
    cb-name:DELIMITER = '?'.
    FOR EACH employee WHERE employee.date-resigned = ? NO-LOCK BY employee.employee-no.
    cb-name:ADD-LAST(TRIM(STRING(employee.employee-no, '99999999') + " - " + employee.last-name + ", " + employee.first-name + " " + SUBSTRING(employee.middle-name,1,1)) + ".",employee.employee-no).
    END.
    cb-name:SCREEN-VALUE = cb-name:ENTRY(1).


    in the value-changed of browse:

    ASSIGN cb-name:SCREEN-VALUE =
    STRING(TRIM(STRING(employee.employee-no, '99999999') + " - " + employee.last-name + ", " + employee.first-name + " " + SUBSTRING(employee.middle-name,1,1)) + "." ,
    STRING(employee.employee-no, '99999999')).


    if the employee no has a string value of 9, progress will change it to 0.. producing an error message that has an invalid value..

    ex: from 819001 /*correct*/ to 810001 /*incorrect*/


    if i message the STRING(employee.employee-no, '99999999')), it will display the correct string value

    Continue reading...

Compartilhe esta Página