Zum Hauptinhalt gehen

Suche

Suche

Modifying Forms Input with VBScript for Text on a Label

Kommentare

3 Kommentare

  • Avatar
    Shotaro Ito

    You can use Object Value to refer other text's value and modify that.

    Create a text (TxtDate)off-label (outside of the template) so it won't be printed.

    Link Calender control to the text (TxtDate).

    Create a text on the label (TxtDate2). Change data source from Embedded data to Object Value, of TxtDate.

    On TxtDate2's datasource, you can apply Transforms (Search and Replace or VB Script.)

    On VB script transform, you can modify value like

    ’Change 01-31 to A-_
    Value = CHR(64 + CINT(MID(Value,9,2)))

     

    0
  • Avatar
    Sean Seago

    Most of my experience is with C++ and Python so my natural inclination is to try to get the value of TxtDate with something like "TxtDate.Value" but this isn't valid in VB Script.

    As I don't spend much time working with VB Script, and I haven't been able to find any documentation that has been helpful, I was wondering if you can you elaborate on what you meant by "Change data source from Embedded data to Object Value, of TxtDate."  Perhaps with some example code using the label names you mentioned in your previous reply.

    0
  • Avatar
    Sean Seago

    Going through the motions again, I see what you meant.  By using TxtDate as the Object Value (in the text properties dialog) and then performing a VB Script transformation under the Transformations tab, I was able to get the desired result. 

     

    Thank you so much!

    0

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