Two DbColumns in one field

Hi Guys,

Have a few problems with a couple of fields and computed values. I’ve been thinking and it can be easily be fiex if the following is possible.

I have three Editable Dialog List fields on a form, these are:

  1. Region

  2. dropDown1

  3. dropDown2

Region has one choice per line. dropDown 1 and 2 do a DbColumn.

What it does - Depending on what value is chosen from Region either dropDown1 or 2 will show.

What i want to be able to do is have ONE drop down that has two scenarios. i.e.

if Region A is chosen to this DbColumn and if Region B is chosen do this DBColumn.

Is this possible?

Code in one of the drop down’s is:

var1 := @DbColumn(“”:“”;“”:“”;“VIEW NAME”;1);

@Trim(“—Select—”:var1)

Thanks is advance

Subject: Two DbColumns in one field

No problem, in the choices for the drop-down set var1 and var2 to the different dbcolumns, then @if(Region=x;var1;var2), or something similar.

Don’t forget to check the box on the dropdown field that says ‘refresh choices on document refresh’

Dan

Subject: Two DbColumns in one field

Set the values for a single DBColumn based on variables for those values that change:

colNum := @If(Region = “A” ; 1 ; 2);

viewName := @If(Region = “A” ; “View1” ; “View2”);

@Sort(@Unique(@DBLookup(“”:“”;“”:“”;“ViewName” ; colNum)))