Thanks, Ben.  After going through the C API documentation a little more 
thoroughly, I found that that information was part of the field limits 
information as you describe below.  I took another look at the .NET API in the 
debugger with that in mind and found that it returns it via a SelectionLimit 
class that returns the ID/Value mapping as an ArrayList of object arrays.  I 
was able to use that to get it to work.

Thanks,
Lyle

From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Ben Chernys
Sent: Wednesday, December 23, 2009 1:22 AM
To: [email protected]
Subject: Re: Retrieve Selection Field Values using API

**
Hi Lyle,

The enum selection for ARValueStruct is an integer.  If you want the label or 
string you need to derive the associated integer.  There are two strings 
available.  One is the "definition" string and the other is a view based label. 
 In the English or - generally - default view the two strings are the same.

You will need the ARLimits struct for the field in q through ARGetField.  Then 
you can go through the list of strings and convert the string to an integer.  
This is the "definition" string.  You will need to do much more to get the view 
based string.

Caution.  There are three types of enums (since 5.12 which was a major 
release!) - one of which has never been implemented (at least not by any 
clients).  You determine the values and process the ARLimits is based on the 
enum type.

Meta-Update handles all this of-course.  And no special import code is needed.  
Import scripts are generally trivial to write - say two hours for a reasonably 
complex one.

Cheers

Ben Chernys

Senior Software Architect
Software Tool House Inc.

Canada / Deutschland / Germany
Mobile:      +49 171 380 2329    GMT + 1 + [ DST ]
Email:       mailto:Ben.Chernys_AT_softwaretoolhouse.com
Web:         http://www.softwaretoolhouse.com<http://www.softwaretoolhouse.com/>

A free notepad for Diary fields:
http://www.softwaretoolhouse.com/downloads/DiaryFieldEditor.htm
An ARS API scripting tool used for migrations, integrations, imports, reports, 
extracts, batch jobs:
http://www.softwaretoolhouse.com


________________________________
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Lyle Taylor
Sent: December 22, 2009 8:48 PM
To: [email protected]
Subject: Retrieve Selection Field Values using API
**
Hi all,

Remedy 7.1 p5

I'm trying to write a type of specialized import program, and I've come across 
what may be a bug in the .NET API in setting the value of Selection Fields 
using the ID (numerical value) - it seems to be setting the fields to $NULL$ 
instead of the value I've supplied.  I've found, however, that I can 
successfully set the value using a string, but I'm pulling the values that I'm 
setting from Remedy using the API, and it returns the ID rather than the 
string.  So, I'm trying to figure out how I can get the string value (Selection 
Value) for a given ID for a selection field.  I went back to the C API 
documentation, since that's the core of all the other APIs, and perhaps I just 
can't see it, but I couldn't find a way using the C API to do it either.  Does 
anyone know if there is a way, using any of the APIs, to get the string value 
for a given ID for a selection field on a form?

Thanks,
Lyle


NOTICE: This email message is for the sole use of the intended recipient(s) and 
may contain confidential and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply email and destroy all copies of 
the original message.

_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_
_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

Reply via email to