Droplist value from second column

Hi,

I am in MT Cloud environment.

In Mongoose form I am using DropList with two columns. When user select value, it is saves value from first column in Property field binded to DropList component.

But am I able to save also value from second column displayed in DropList?

Thanks

Parents
  • Why would you want to save the value of the second column? You have access at any point to that value based on the value of the first column.

  • That may not necessarily always be the case. If you've built a listsource from script code using disparate data from multiple IDOs or an API or two, a simple validation wouldn't be helpful in this case to grab the other values. 

    One option would be to write a series of form events to fire load collection handlers to get the other value(s) and then fire those from the validation or data change event. One might consider the design of the data/IDO's involved to see if table joins would prevent this kind of thing from being necessary.

    For a listsource built from an IDO, a simple validation or load collection event handler would work. 

    For complex listsources, rather than do a series of load events, the list values can be access through the component in form or global script. Use ThisForm.Components["compname"].ListIndex to get the currently selected index value of the list, then use that in ThisForm.Components["compname"].GetListValue(row,col) to grab the specific column value you're looking for:

  • Thanks, that is what I needed.

    But how can I get currentRow value?

    I hope that this function returns it:

    ThisForm.Components["dropList1_Username"].GetListBoxCurSel()

    But I only receive this error:

    I am trying to call in on Data Change event on my DropList component

  • ThisForm.Components["compname"].ListIndex

Reply Children
No Data