List Info

Thread: Custom Field Question




Custom Field Question
country flaguser name
United States
2007-08-15 11:19:56
I'm writing a custom field type for use on a particular
local custom  
element. I would like to show different options depending on
the  
value in another field assigned to the custom element.

In less abstract terms, here's a faked-up custom element's
edit form:

	My Title: Test Data
	My List of ID Values: 1,34,927
	[more fields and their values]
	My Custom field: [runs a query to pull the options that are
related  
to id values 1,34 and 927, then shows a selection list of
those options]

Within the context of the custom field, how can I know the
values  
assigned to another field? Do I have to query for that
field's value  
directly or is there a structure or query result set I can
reference  
to pull the value?

Thanks,
Danny Collier
_______________________________________________
Commonspotchattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot


Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

RE: Custom Field Question
user name
2007-08-15 12:15:12
Are you pulling data from the CommonSpot db from the custom
field, or is it your own database, your own schema? Unless
I'm missing something obvious, you should be able to simply
do an inner join. (I call them lookup tables, M$ refers to
it as Master/Detail)

For example:

IDs table       SELECTIONS table
=========       ================
ID | NAME       selectionID | ID | NAME

The query:

SELECT S.*
FROM IDs I
INNER JOIN Selections s
ON I.ID = S.ID
WHERE S.ID IN (1,34,927)
ORDER BY S.NAME


Hope that helps. By the way, is GMU using CommonSpot?


Lucius Kahng
Manager Information Systems
703-841-3206(W) - 703-313-8146(M)
National Electrical Manufacturers Association



-----Original Message-----
From: commonspot-bounceschattyfig.figleaf.com
[mailto:commonspot-bounceschattyfig.figleaf.com] On
Behalf Of Daniel Collier
Sent: Wednesday, August 15, 2007 12:20 PM
To: Commonspot Mailing List
Subject: [Commonspot] Custom Field Question

I'm writing a custom field type for use on a particular
local custom
element. I would like to show different options depending on
the
value in another field assigned to the custom element.

In less abstract terms, here's a faked-up custom element's
edit form:

        My Title: Test Data
        My List of ID Values: 1,34,927
        [more fields and their values]
        My Custom field: [runs a query to pull the options
that are related
to id values 1,34 and 927, then shows a selection list of
those options]

Within the context of the custom field, how can I know the
values
assigned to another field? Do I have to query for that
field's value
directly or is there a structure or query result set I can
reference
to pull the value?

Thanks,
Danny Collier
_______________________________________________
Commonspotchattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot


Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

NEMA's annual meeting, Illuminations Weekend, is November 9
& 10, 2007
Boca Raton Resort & Club
Register NOW for early-bird savings at http://www.nema.org
/illuminations
_______________________________________________
Commonspotchattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot


Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

Re: Custom Field Question
country flaguser name
United States
2007-08-15 12:44:23
I'm going to pull a set of global custom elements from
Commonspot,  
but I believe I know how I'll handle that. However, I don't
know how  
to determine the value of another field within the context
of my  
custom field, so I don't know the "1,34,927"
portion of the query.

The Developer's Guide says the system builds forms from a
query  
result set. If I had the name of that query, I could use it
to find  
the value of the other fields, but I haven't seen that
information in  
the documentation. Commonspot usually offers developers
access to  
structured data, but I haven't been able to identify a
request scope  
structure that holds the list of form fields and their
values.

Mason is using Commonspot, though we do not yet have any
sites live  
using it. I'm hoping the College of Humanities and Social
Sciences  
will have a new site in Commonspot by November. I'll post
something  
when we go live. We're documenting the process, and I'll
share that  
documentation as well when we get to a point where it's
worth sharing.

D.



On Aug 15, 2007, at 1:15 PM, Kahng, Lucius wrote:

> Are you pulling data from the CommonSpot db from the
custom field,  
> or is it your own database, your own schema? Unless I'm
missing  
> something obvious, you should be able to simply do an
inner join.  
> (I call them lookup tables, M$ refers to it as
Master/Detail)
>
> For example:
>
> IDs table       SELECTIONS table
> =========       ================
> ID | NAME       selectionID | ID | NAME
>
> The query:
>
> SELECT S.*
> FROM IDs I
> INNER JOIN Selections s
> ON I.ID = S.ID
> WHERE S.ID IN (1,34,927)
> ORDER BY S.NAME
>
>
> Hope that helps. By the way, is GMU using CommonSpot?
>
>
> Lucius Kahng
> Manager Information Systems
> 703-841-3206(W) - 703-313-8146(M)
> National Electrical Manufacturers Association
>
>
>
> -----Original Message-----
> From: commonspot-bounceschattyfig.figleaf.com
[mailto:commonspot- 
> bounceschattyfig.figleaf.com] On Behalf Of Daniel Collier
> Sent: Wednesday, August 15, 2007 12:20 PM
> To: Commonspot Mailing List
> Subject: [Commonspot] Custom Field Question
>
> I'm writing a custom field type for use on a particular
local custom
> element. I would like to show different options
depending on the
> value in another field assigned to the custom element.
>
> In less abstract terms, here's a faked-up custom
element's edit form:
>
>         My Title: Test Data
>         My List of ID Values: 1,34,927
>         [more fields and their values]
>         My Custom field: [runs a query to pull the
options that are  
> related
> to id values 1,34 and 927, then shows a selection list
of those  
> options]
>
> Within the context of the custom field, how can I know
the values
> assigned to another field? Do I have to query for that
field's value
> directly or is there a structure or query result set I
can reference
> to pull the value?
>
> Thanks,
> Danny Collier
> _______________________________________________
> Commonspotchattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/commonspot

>
> Brought to you by Fig Leaf Software
> Premier Authorized Paperthin Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om
>
> NEMA's annual meeting, Illuminations Weekend, is
November 9 & 10, 2007
> Boca Raton Resort & Club
> Register NOW for early-bird savings at http://www.nema.org/ 
> illuminations
> _______________________________________________
> Commonspotchattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/commonspot

>
> Brought to you by Fig Leaf Software
> Premier Authorized Paperthin Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om

_______________________________________________
Commonspotchattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot


Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

Re: Custom Field Question
country flaguser name
United States
2007-08-15 13:24:53
Actually, I just found the answer in section 8.4.2.2 of the 

Developer's Guide. The query is available as a local
variable called  
"fieldQuery".

Sorry to bug the list with a question I can answer via the 

documentation. Thank you for the help, Lucius.

D.

On Aug 15, 2007, at 1:44 PM, Daniel Collier wrote:

> I'm going to pull a set of global custom elements from
Commonspot,  
> but I believe I know how I'll handle that. However, I
don't know  
> how to determine the value of another field within the
context of  
> my custom field, so I don't know the
"1,34,927" portion of the query.
>
> The Developer's Guide says the system builds forms from
a query  
> result set. If I had the name of that query, I could
use it to find  
> the value of the other fields, but I haven't seen that
information  
> in the documentation. Commonspot usually offers
developers access  
> to structured data, but I haven't been able to identify
a request  
> scope structure that holds the list of form fields and
their values.
>
> Mason is using Commonspot, though we do not yet have
any sites live  
> using it. I'm hoping the College of Humanities and
Social Sciences  
> will have a new site in Commonspot by November. I'll
post something  
> when we go live. We're documenting the process, and
I'll share that  
> documentation as well when we get to a point where it's
worth sharing.
>
> D.
>
>
>
> On Aug 15, 2007, at 1:15 PM, Kahng, Lucius wrote:
>
>> Are you pulling data from the CommonSpot db from
the custom field,  
>> or is it your own database, your own schema? Unless
I'm missing  
>> something obvious, you should be able to simply do
an inner join.  
>> (I call them lookup tables, M$ refers to it as
Master/Detail)
>>
>> For example:
>>
>> IDs table       SELECTIONS table
>> =========       ================
>> ID | NAME       selectionID | ID | NAME
>>
>> The query:
>>
>> SELECT S.*
>> FROM IDs I
>> INNER JOIN Selections s
>> ON I.ID = S.ID
>> WHERE S.ID IN (1,34,927)
>> ORDER BY S.NAME
>>
>>
>> Hope that helps. By the way, is GMU using
CommonSpot?
>>
>>
>> Lucius Kahng
>> Manager Information Systems
>> 703-841-3206(W) - 703-313-8146(M)
>> National Electrical Manufacturers Association
>>
>>
>>
>> -----Original Message-----
>> From: commonspot-bounceschattyfig.figleaf.com
[mailto:commonspot- 
>> bounceschattyfig.figleaf.com] On Behalf Of Daniel
Collier
>> Sent: Wednesday, August 15, 2007 12:20 PM
>> To: Commonspot Mailing List
>> Subject: [Commonspot] Custom Field Question
>>
>> I'm writing a custom field type for use on a
particular local custom
>> element. I would like to show different options
depending on the
>> value in another field assigned to the custom
element.
>>
>> In less abstract terms, here's a faked-up custom
element's edit form:
>>
>>         My Title: Test Data
>>         My List of ID Values: 1,34,927
>>         [more fields and their values]
>>         My Custom field: [runs a query to pull the
options that  
>> are related
>> to id values 1,34 and 927, then shows a selection
list of those  
>> options]
>>
>> Within the context of the custom field, how can I
know the values
>> assigned to another field? Do I have to query for
that field's value
>> directly or is there a structure or query result
set I can reference
>> to pull the value?
>>
>> Thanks,
>> Danny Collier
>> _______________________________________________
>> Commonspotchattyfig.figleaf.com
>> To change your subscription options or search the
archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/commonspot

>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Paperthin Consulting and
Training
>> http://www.figleaf.com
>> http://training.figleaf.c
om
>>
>> NEMA's annual meeting, Illuminations Weekend, is
November 9 & 10,  
>> 2007
>> Boca Raton Resort & Club
>> Register NOW for early-bird savings at http://www.nema.org/ 
>> illuminations
>> _______________________________________________
>> Commonspotchattyfig.figleaf.com
>> To change your subscription options or search the
archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/commonspot

>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Paperthin Consulting and
Training
>> http://www.figleaf.com
>> http://training.figleaf.c
om
>
> _______________________________________________
> Commonspotchattyfig.figleaf.com
> To change your subscription options or search the
archive:
> http://chattyfig.figleaf.com/mailman/listinfo/commonspot

>
> Brought to you by Fig Leaf Software
> Premier Authorized Paperthin Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.c
om

_______________________________________________
Commonspotchattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot


Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )