Aller au contenu principal

Recherche

Recherche

Vb Script - Hide Label Objects During Printing When Certain Values Come In.

Commentaires

2 commentaires

  • Avatar
    Legacy Poster
    Would be easier if we could get a copy of the .btw files. As a new signup, I'm not sure if you have that forum ability or not. Also, what is it doing that's expected. Remember that this code is case sensitive as well, so if your warning field says "Warning", it will resolve to false when compared to "warning".

    The following code worked for me. I put this as the [i]Data Source[/i] > [i]Visual Basic Script[/i] > [i]Multi-Line Script[/i] for the field I wanted to hide/show based on the "warning" field:

    [code]if Format.NamedSubStrings("warning").Value <> "warning" then
    Value = ""
    else
    Value = "Yes"
    end if[/code]

    Edit: Also, if you haven't, you need to be sure to name your sub-string. It is not enough simply to select a field name from your database. From the[i] Data Source[/i] tab, click [i]Advanced[/i], and then the [i]Share/Name[/i] tab. This is the name referred to in the [b]NamedSubStrings[/b]() function.
    0
  • Avatar
    Legacy Poster
    [quote name='nRyder' timestamp='1329321965' post='1742']
    Would be easier if we could get a copy of the .btw files. As a new signup, I'm not sure if you have that forum ability or not. Also, what is it doing that's expected. Remember that this code is case sensitive as well, so if your warning field says "Warning", it will resolve to false when compared to "warning".

    The following code worked for me. I put this as the [i]Data Source[/i] > [i]Visual Basic Script[/i] > [i]Multi-Line Script[/i] for the field I wanted to hide/show based on the "warning" field:

    [code]if Format.NamedSubStrings("warning").Value <> "warning" then
    Value = ""
    else
    Value = "Yes"
    end if[/code]

    Edit: Also, if you haven't, you need to be sure to name your sub-string. It is not enough simply to select a field name from your database. From the[i] Data Source[/i] tab, click [i]Advanced[/i], and then the [i]Share/Name[/i] tab. This is the name referred to in the [b]NamedSubStrings[/b]() function.
    [/quote]

    Thank you Nryder. That worked along with a couple of Object settings I changed in the Bartender Template. I attached a copy of the Carton_Test.btw file along with 2 xml files I saved as text files to show how I tested the logic. Hopefully this is helpful to other users of Bartender that need to use this logic.

    Regards,

    Josh
    0

Vous devez vous connecter pour laisser un commentaire.