Franklin,

If you want to solve this by hacking and slashing in the database, you
can query against the arschema table.

Try this:

SELECT field.* from arschema, field
where name = '<name from form>'
and arschema.schemaid = field.schemaid

Of course this gets you in the position where you would need to know
the schema name as held in the database, and that is not the same as
the schema ALIAS. HPD:Helpdesk is HPD_HELPDESK or the like. The
benefit is that this is (or at least: is supposed to be) consistent
between installations, i.e. the names will not vary between for
instance different installs of ITSM 7, whereas the schema IDs of
course can differ a lot; also between Production - Acceptance - Test -
Development boxes schema ID's will most probably very a lot.

In my opinion it is always a sign of bad code if the schema ID is
hardcoded anywhere, it should always be looked up first, either using
a query on ARSCHEMA or via an API call.

Regards,
-- 
Michiel Beijen
Software Consultant
+31 6 - 457 42 418
Bee Free IT + http://beefreeit.nl




On Mon, Dec 1, 2008 at 6:45 PM, Franklin Lee <[EMAIL PROTECTED]> wrote:
> I can, by querying against the field table, get field information such
> as fOption and default value for all the fields in a given form. To do
> this, I need the schema id.
>
> Is there any other way to get this information without knowing the
> schema id?
>
>
> Carey Matthew Black wrote:
>> Franklin Lee,
>>
>> Depending on your ARS version, you could create an ARS View form over
>> the arschema table and then use "normal" ARS API queries to get at the
>> data.
>>
>> FWIW: The schemaId is viewed as a "local implementation detail" that
>> really should be transparent to the ARS developers and/or users. Which
>> leads to this question....
>>
>> Why do you need to know the schemaId?
>>
>> I ask because there might be other ways you could achieve your goals.
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> --
> Arsperl-users mailing list
> Arsperl-users@arsperl.org
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


--
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to