Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
281 views

Counting picklist items

Hello,

In a picklist, is it possible to get the number of items in the list?
I believe I could select all items, and then count them. But is there a
way of avoiding this, and still get the number of records in the picklist?

Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Counting picklist items


Use

form.getAllValues( "myPicklist" )[0].length

Embed in try .. catch

Good luck

Wolfgang


On 28.12.2011 12:45, Nicolai Jensen wrote:
> Hello,
>
> In a picklist, is it possible to get the number of items in the list?
> I believe I could select all items, and then count them. But is there a
> way of avoiding this, and still get the number of records in the picklist?
>

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: Counting picklist items

On Wed, 28 Dec 2011 11:58:35 +0000, Wolfgang Schreiber wrote:

> Use
>
> form.getAllValues( "myPicklist" )[0].length
>
> Embed in try .. catch


Exellent. Thank you very much.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.