Hi Formspider TEam,

Is there an API (or javascript function) to get the display value of a combobox? api_component.getValue will return the column value, but i want the diplayed value that was selected form the listdatasource.

Is this possible?

Thanks,
Michiel A.

asked 30 Jul '13, 03:36

Michiel%20A's gravatar image

Michiel A
5161749
accept rate: 13%


Hi Michiel,

I guess you can get the Code and then run one more query to get the Display value based on the Code. Would that work for you?

Kind Regards,
Yalim

link

answered 30 Jul '13, 05:44

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 21%

Hi Yalim,

The issue is in "and then run one more query.."

I want to create a generic procedure for this functionality. In the generic procedure i only know the panel and component (and thus the column value). In order to get the displayed value i need to know the combobox listDatasource and displayColumn. But there are no API's to get those, so i must go into the Formspider repository to get these. Then i must query the listdatasource to get the display value.

It would much easier if i was able to get the combobox display value directly via an API..

(30 Jul '13, 07:13) Michiel A

Hi Michiel,

You can define the value column of the list datasource as the primary key of this datasource. Then, you can access the display value through this primary key:

api_datasource.getColumnValueXXByPK('listDS.displayColumn', api_component.getValue('comboboxName'))

Hope this helps,
Ibrahim

link

answered 30 Jul '13, 07:07

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

Hi Ibrahim,

This has the same issue. In order to use this API in a generic procedure, i would have to get the listDS and displayColumn (and the datatypes) from the Formspider repository, and then get the display value (using the above API).

What would be best if there would be an API that would get me the DisplayValue as text, something like: api_component.getComboboxDisplayValueTx('comboboxpanel.comboboxname');

Would this be possible at all?

(30 Jul '13, 08:05) Michiel A
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×30
×2

Asked: 30 Jul '13, 03:36

Seen: 1,587 times

Last updated: 30 Jul '13, 08:05


© Copyright Gerger 2017