Which Code Can I use to Pre-populate a Drop-down in the Object Group with the Values from Another Object Group Controls?

How Can We Help?

Which Code Can I use to Pre-populate a Drop-down in the Object Group with the Values from Another Object Group Controls?

< Back

Answer

Code to pre-populate a drop-down in the Object Group with the values from another Object Group controls:

string ResultSet = String.Empty;
ObjectGroup grp = activity.ObjectGroups.NamedItem("OGName1");
for(int index = 0; index <= grp.Lines - 1; index++)
{
FullName = activity.GetControlValue("Control1Name", grp.ID, index) + ' ' + activity.GetControlValue("Control2Name ", grp.ID, index);
ResultSet = ResultSet + FullName;
if (index != grp.Lines)
ResultSet = ResultSet + ";";
}
ObjectGroup grp3 = activity.ObjectGroups.NamedItem("OGName2");
grp3["DropdownName"].Options["Items"] = ResultSet;
Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X