How to Change Source Record list of Combo Box Runtime(Condition Based)

How to Change Source Record list of Combo Box Runtime(Condition Based)

  
Can anyone tell me How to Change Source Record list of Combo Box Runtime which is Based on some Condition.
For example 
IF (GetDocumentType.Record.DocumentType.DocumentType = "Doc1")then Doc1.List
IF (GetDocumentType.Record.DocumentType.DocumentType = "Doc2")then Doc2.List

So if anyone knows please tell me How to put these conditions.
Thanks
Jigs Mehta
That is not going to happen like that.

Instead, bind the ComboBox's source to a local variable, and then set that local variable equal to the record list that you want to populate the combo box with.

Keep in mind that the record lists must have the same Record definition. If you want different pieces of data in there, you will need to do something like:

1. Make a Structure with an Integer attribute and a Text attribute.
2. Make a local variable of type Record defined as this new structure.
3. Make a local variable of type RecordList defined as this new structure.
4. Bind the ComboBox to that local variable.
5. Fill the local variable by iterating over the correct source list, converting the ID to an integer using EntityRefIntegerToInteger and whatever the on-screen label should be to text, putting it in the Record variable, and then using ListAppend to add that Record variable to the RecordList.

J.Ja