If you want to reference other fields, my recommendation is to have that data pulled in to a dataview that you can then call with a dataview.column binding.
You’ll need to change your combobox to be populated from that dataview. When you make a selection, you can then setup events (probably a variety of ways) to use the selected value of your combo to identify the correct row in the dataview and then provide the value of your Character01 column.
Here’s a quick/dirty example:
BAQ DataView (I’ll use Reason Codes as an example):
You need an event to populate that dataview… I’m just going to use a button click for simplicity sake.
So, my form has a button (just to call my BAQ and populate my dataview)… a combobox populated by that dataview (but bound to TransView)… and a textbox to show another value (Reason_Description for example):
My Combobox set-up is super simple… (3) settings:
I tie it to my BAQ Dataview:
And I declare Reason_ReasonCode as my Text and Value Field:
That’s it!
I then have an event that fires when I make a selection of my combobox. There is probably 10 different ways to do this… but this sequence works for me, so I generally do it this way:
First… I create another dataview. You used to be able to just create dataviews on the fly for things like this, but as @klincecum previously noted in another thread, this doesn’t seem to work any more.
So, I create a new dataview called BAQDVReasonCodesSelected. All you have to do is create a dataview and provide a name:
Then, here’s my event…
When I make a selection in my combobox (bound to TransView.ReasonCode), I need my event to fire. So I use a trigger of Data Table, Column Changed, TransView, ReasonCode
I then perform a dataview-copy… I copy my BAQDVReasonCodes dataview to my new dataview BAQDVReasonCodesSelected.
I then filter THAT dataview:
Now, the only row in my dataview is where my selected TransView.ReasonCode value matches the Reason_ReasonCode value in my BAQDVReasonCodesSelected dataview.
I then perform a row-update to set TransView.Reason_Description to the value of BAQDVReasonCodesSelected.Reason_Description.
Result:
My combobox is populated by my BAQ dataview… but is bound the TransView.ReasonCode… that value is set when the user makes a selection.
My event copies my BAQ dataview to another, which I can then filter (without botching the original BAQ Dataview) to a specific record based on the value of TransView.ReasonCode…
The event then row-updates the Reason_Description value of that dataview row to TransView.Reason_Description.
~*~
It sounds like a lot… but it took longer for me to write this post then it did to set this all up.