Skip to main content

Search

Search

Hide Database Field Datasource If A Object Field Datasource Contains A Value

Comments

3 comments

  • Avatar
    Legacy Poster

    I found a way to get my label working, and thought I would share it. There may be a better way, (Bartender 10.1 might have a conditional statement for it). and if so let me know.

     

    1. Create an object value (1) with two data sources types, one for a database value (A) and one for a data entry value (B)

     

    2. Create two object values off the label. One for the database value (a)  and one for data entry value (b)

     

    3. Link the data source to a database for one value (a) and an embedded data source for the data entry value (b) Select Transforms > Data Entry Control > Assign the input type from the Data Entry Form for (b)

     

    4. Link the database values (A) and one for data entry value (B) as object values to data source objects (a) and (b)

     

    5. Add a VBScript to the (b) value via Transforms that hides the database value (a) if a value greater than 0 is entered for (b).

     

    If Format.Objects("NameofField").Value > "0" Then

    Value = ""

    End If

     

    Finished.

    0
  • Avatar
    Legacy Poster

    Apologies, the Emoticons were not intentional, just appearing when I posted.

    0
  • Avatar
    Shotaro Ito

    I found a way to get my label working, and thought I would share it. There may be a better way, (Bartender 10.1 might have a conditional statement for it). and if so let me know.

     

    1. Create an object value (1) with two data sources types, one for a database value (A) and one for a data entry value ( B)

     

    2. Create two object values off the label. One for the database value (a)  and one for data entry value ( B)

     

    3. Link the data source to a database for one value (a) and an embedded data source for the data entry value ( B) Select Transforms > Data Entry Control > Assign the input type from the Data Entry Form for ( B)

     

    4. Link the database values (A) and one for data entry value ( B) as object values to data source objects (a) and ( B)

     

    5. Add a VBScript to the ( B) value via Transforms that hides the database value (a) if a value greater than 0 is entered for ( B).

     

    If Format.Objects("NameofField").Value > "0" Then

    Value = ""

    End If

     

    Finished.

     

    Thanks for sharing!

    This yellow baby can be silenced from "Enable emoticons" in Post options right (shown on More replies option).

    0

Please sign in to leave a comment.