Topic Options
Rate This Topic
#140060 - 05/22/08 09:26 AM FieldID to field name?
Przemek Offline
Just Signed Up

Registered: 05/22/08
Posts: 1
Hello Everyone!

I'm new to the forums and I'm just starting my journey through developing a small Java application to help close a large bunch of L-Stages.

What I've got now is a simple piece of code to list all the FieldIDs on an L-Stage form. What I would like is to have a list of the IDs together with their display names as they appear on the form, so that I know which ID coresponds to which field.

Could anyone point me in the right direction?

Thanks,
Przemek

Top
#140078 - 05/27/08 09:45 AM Re: FieldID to field name? [Re: Przemek]
soba Offline
Stealth Member

Registered: 01/20/06
Posts: 122
Loc: Turkey
Hi Przemek,

First I must admit, I didn't try the following at all. I don't know what is an L-stage form either. But I think the following might provide some direction.

You can use the FieldFactory class to get a Field object, using the form name and field ID.

Then you can use the getDisplayInstance method of Field object to have a DisplayInstanceList object. There might be several labels for a field if there are more views than one. You can use the method getProperty (of DisplayInstanceList) with a specific view ID and appropriate tag to get the label. For data fields, you can use Constants.AR_DPROP_LABEL tag, for example. For other types (like buttons, attachment fields etc.) you need to find out which tags work.

I hope this helps.
_________________________
~soba

Top
#140294 - 07/14/08 06:49 PM Re: FieldID to field name? [Re: Przemek]
steve_mcdonald Offline
Stealth Member

Registered: 06/12/01
Posts: 23
you can query the field table using sql. I don't do anything with java as of yet but in sql it goes like this:

select fieldid, fieldname
from field
where schemaid = <your schemaid here>

Top