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

0
Avatar
Legacy Poster

I have object field within a label that is pulling values from two datasources, a database field and an object field.

 

The If statement I am trying to construct will hide the database field value if the object field contains a value.

 

The goal is to allow the end user to manually enter a quantity at the time of printing and this hides default database quantity. 

 

 

What would be the best way to do this using Bartender 10.0

 

Thanks

 

 

 

3 comments

0
Avatar
Legacy Poster
Comment actions Permalink

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
Comment actions Permalink

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

0
Avatar
Shotaro Ito
Comment actions Permalink

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).

Please sign in to leave a comment.