Re: [Arsperl-users] Get schema id from form name without arschema

2008-12-01 Thread jeff murphy

On Dec 1, 2008, at 12:45 PM, Franklin Lee 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?




For default value, etc, I think getField() should return that  
information. You don't need the schema ID to use getField()


http://www.arsperl.org/manual/ds_field_hash.html



-
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=100url=/


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


Re: [Arsperl-users] Get schema id from form name without arschema

2008-12-01 Thread Michiel Beijen
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=100url=/


 --
 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=100url=/


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


Re: [Arsperl-users] Get schema id from form name without arschema

2008-11-26 Thread Carey Matthew Black
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.

-- 
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap Pick two.


On Tue, Nov 25, 2008 at 6:02 PM, Franklin Lee [EMAIL PROTECTED] wrote:
 Is there any way to find the schema Id of a form given the form's name
 _without_ doing an explicit SELECT query against the arschema table? In
 other words, is the mapping stored somewhere besides the arschema table?

-
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=100url=/


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