Zum Hauptinhalt gehen

Suche

Suche

Incrementing text fields in the same label

Kommentare

2 Kommentare

  • Avatar
    Arley Lozada

    Ok. I was able to get partial of what I needed to work. When I enter a value for the first field ("WWN1"), I get the rest of the fields to to add in +1 to each number. I did this by entering the following for each object in Transforms/VB Script/OnProcessData. However, now my issue is that the value for WWN1 will be in hex as per my original post and that is not working. How can I read the object in hex and calculate (adding the value) in hex?

    Text 2:

    If Not IsNumeric(Value) Then Exit Sub 

    Value = Format.NamedSubStrings("WWN1").Value + 1

    Text 3:

    If Not IsNumeric(Value) Then Exit Sub 

    Value = Format.NamedSubStrings("WWN1").Value + 2

    Text 4:

    If Not IsNumeric(Value) Then Exit Sub 

    Value = Format.NamedSubStrings("WWN1").Value + 3

    ...

    ...

    Text 9:

    If Not IsNumeric(Value) Then Exit Sub 

    Value = Format.NamedSubStrings("WWN1").Value + 8

    0
  • Avatar
    Peter Thane

    I have not worked out how to do this with a starting value that is already in hex, but if you convert the starting number to a "normal" number then you could could do something like this, where the starting number string has been named "BaseNumber". 
    If you are using a Data Entry form to enter the starting value then you would probably need to adjust the VB to an EventControlledScript>OnPostPrompt.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.