PickList field with values from a multi-valued attribute

Hello there,

I have a PickList field in my form that I want to fill with a list of
values.  Let's call that field "department".
The values must be dynamically obtained from a multi-valued attribute
of a given Organizational Unit.  Let's call that attribute
"list-of-departments".  I have a DAL entity that exposes the object
class (Organizational Unit) and its attribute.  Let's call the DAL
entity "OU" and let's call the exposed attribute key
"list-of-departments" (like the attribute itself).
Of course, I have a field that contains the DN of the Organization Unit
which I want to get the list-of-departments from.  Let's call that field
"DepartmentSource".

Here's what I do : I configure on the Department field an onload event
with this simple expression :

Code:
--------------------
    IDVault.get("Department", 'DepartmentSource', 'OU', 'list-of-departments')
--------------------


Note : The tooltip for -IDVault.get(fieldname, dn, entity-type,
attribute) -says "retrieves the value(s) of the attribute for the given
entity.  The result will be an array of values.  These will be placed in
the chosen field").

So, as far as I understand, my expression should fill the field
"Department" with the list of values obtained from the
"list-of-departments" attribute of the "DepartmentSource" entity, which
is of type "OU".

Problem is : the list remains blank when the form is displayed.

Am I not understanding something here ?  Is there an additional step to
take ?

Thanks for any hint regarding this.

Jerome

Note : Alternatively, can anyone direct me to a more "task oriented"
set of documentation/guides, as I'm finding the Design Guide is really
an exhaustive review of available options but doesn't give much insights
as to what options would be use in what given context.


-- 
JeromeBuyle
------------------------------------------------------------------------



0
JeromeBuyle
8/27/2009 3:56:02 PM
novell.id-manager.userapp 4379 articles. 0 followers. Follow

6 Replies
1246 Views

Similar Articles

[PageSpeed] 34
Get it on Google Play
Get it on Apple App Store

JeromeBuyle;1848042 Wrote: 
> Hello there,
> 
> I have a PickList field in my form that I want to fill with a list of
> values.  Let's call that field "department".
> The values must be dynamically obtained from a multi-valued attribute
> of a given Organizational Unit.  Let's call that attribute
> "list-of-departments".  I have a DAL entity that exposes the object
> class (Organizational Unit) and its attribute.  Let's call the DAL
> entity "OU" and let's call the exposed attribute key
> "list-of-departments" (like the attribute itself).
> Of course, I have a field that contains the DN of the Organization Unit
> which I want to get the list-of-departments from.  Let's call that field
> "DepartmentSource".
> 
> Here's what I do : I configure on the Department field an onload event
> with this simple expression :
> > 
Code:
--------------------
  >   > IDVault.get("Department", 'DepartmentSource', 'OU', 'list-of-departments')
--------------------
> > Note : The tooltip for -IDVault.get(fieldname, dn, entity-type,
> attribute) -says "retrieves the value(s) of the attribute for the
> given entity.  The result will be an array of values.  These will be
> placed in the chosen field").
> 
> So, as far as I understand, my expression should fill the field
> "Department" with the list of values obtained from the
> "list-of-departments" attribute of the "DepartmentSource" entity,
> which is of type "OU".
> 
> Problem is : the list remains blank when the form is displayed.
> 
> Am I not understanding something here ?  Is there an additional step
> to take ?
> 
> Thanks for any hint regarding this.
> 
> Jerome
> 
> Note : Alternatively, can anyone direct me to a more "task oriented"
> set of documentation/guides, as I'm finding the Design Guide is really
> an exhaustive review of available options but doesn't give much
> insights as to what options would be use in what given context.


I guess, you missed the last part. I am assuming you made the field
control type as DNDisplay and field data type as dn.
in the field properties, choose the DAL entity key as Department and in
the 
display expression choose the att you want to display.
hope this helps.


-- 
----------------------------------------
-eDir4ever :)
------------------------------------------------------------------------
edir4ever's Profile: http://forums.novell.com/member.php?userid=28533
View this thread: http://forums.novell.com/showthread.php?t=384498

0
edir4ever
8/27/2009 4:46:02 PM
On 08/28/2009 12:56 AM, JeromeBuyle wrote:

> Hello there,
> 
> I have a PickList field in my form that I want to fill with a list of
> values.  Let's call that field "department".
> The values must be dynamically obtained from a multi-valued attribute
> of a given Organizational Unit.  Let's call that attribute
> "list-of-departments".  I have a DAL entity that exposes the object
> class (Organizational Unit) and its attribute.  Let's call the DAL
> entity "OU" and let's call the exposed attribute key
> "list-of-departments" (like the attribute itself).
> Of course, I have a field that contains the DN of the Organization Unit
> which I want to get the list-of-departments from.  Let's call that field
> "DepartmentSource".
> 
> Here's what I do : I configure on the Department field an onload event
> with this simple expression :
> 
> Code:
> --------------------
>     IDVault.get("Department", 'DepartmentSource', 'OU', 'list-of-departments')
> --------------------
> 
> 
> Note : The tooltip for -IDVault.get(fieldname, dn, entity-type,
> attribute) -says "retrieves the value(s) of the attribute for the given
> entity.  The result will be an array of values.  These will be placed in
> the chosen field").
> 
> So, as far as I understand, my expression should fill the field
> "Department" with the list of values obtained from the
> "list-of-departments" attribute of the "DepartmentSource" entity, which
> is of type "OU".
> 
> Problem is : the list remains blank when the form is displayed.
> 
> Am I not understanding something here ?  Is there an additional step to
> take ?
> 
> Thanks for any hint regarding this.
> 
> Jerome
> 
> Note : Alternatively, can anyone direct me to a more "task oriented"
> set of documentation/guides, as I'm finding the Design Guide is really
> an exhaustive review of available options but doesn't give much insights
> as to what options would be use in what given context.
> 
> 


field.setValues(IDVault.get("Department", 'DepartmentSource', 'OU',
'list-of-departments'));
0
John
8/27/2009 7:41:28 PM
Hi John,

This seems to make sense, sorry for being such a noob.  I'll try that
tomorrow morning and let you know.

Regards.

J.

jgdasilva;1848225 Wrote: 
> On 08/28/2009 12:56 AM, JeromeBuyle wrote:
> 
> > Hello there,
> >
> > I have a PickList field in my form that I want to fill with a list
> of
> > values.  Let's call that field "department".
> > The values must be dynamically obtained from a multi-valued
> attribute
> > of a given Organizational Unit.  Let's call that attribute
> > "list-of-departments".  I have a DAL entity that exposes the object
> > class (Organizational Unit) and its attribute.  Let's call the DAL
> > entity "OU" and let's call the exposed attribute key
> > "list-of-departments" (like the attribute itself).
> > Of course, I have a field that contains the DN of the Organization
> Unit
> > which I want to get the list-of-departments from.  Let's call that
> field
> > "DepartmentSource".
> >
> > Here's what I do : I configure on the Department field an onload
> event
> > with this simple expression :
> >
> > Code:
> > --------------------
> >     IDVault.get("Department", 'DepartmentSource', 'OU',
> 'list-of-departments')
> > --------------------
> >
> >
> > Note : The tooltip for -IDVault.get(fieldname, dn, entity-type,
> > attribute) -says "retrieves the value(s) of the attribute for the
> given
> > entity.  The result will be an array of values.  These will be placed
> in
> > the chosen field").
> >
> > So, as far as I understand, my expression should fill the field
> > "Department" with the list of values obtained from the
> > "list-of-departments" attribute of the "DepartmentSource" entity,
> which
> > is of type "OU".
> >
> > Problem is : the list remains blank when the form is displayed.
> >
> > Am I not understanding something here ?  Is there an additional step
> to
> > take ?
> >
> > Thanks for any hint regarding this.
> >
> > Jerome
> >
> > Note : Alternatively, can anyone direct me to a more "task oriented"
> > set of documentation/guides, as I'm finding the Design Guide is
> really
> > an exhaustive review of available options but doesn't give much
> insights
> > as to what options would be use in what given context.
> >
> >
> 
> 
> field.setValues(IDVault.get("Department", 'DepartmentSource', 'OU',
> 'list-of-departments'));


-- 
JeromeBuyle
------------------------------------------------------------------------
JeromeBuyle's Profile: http://forums.novell.com/member.php?userid=8585
View this thread: http://forums.novell.com/showthread.php?t=384498

0
JeromeBuyle
8/27/2009 8:36:02 PM
Hi again,

I'm now getting en error message in the UA.  It's in French (due to
browser settings and such) and basically says that an error has occured,
and the function field.setValues() was expecting a string or array
value.  It does not say what type of value was received in place of
string or array.  This is strange considering that IDVault.get() is
supposed to return an array.

Console details :

Code:
--------------------
    ERROR [VirtualDataAccess] Ldap error getting attribute for object: DepartmentSource.  Error: javax.naming.InvalidNameException: DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining name 'DepartmentSource' javax.naming.InvalidNameException: DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining name 'DepartmentSource' 
--------------------


Strange to me, again.  I actually am displaying (for testing purposes)
the value of DepartmentSource in the same form, and it is indeed a valid
DN as far as I can tell.  E.g. in this case :

Code:
--------------------
    ou=someouname,ou=parentouname,o=rootorganizationname
--------------------


I have tried using single- and double-quotes around the
DepartmentSource parameter in IDVault.get() but it gives the same
errors.  Note : Using no quotes of course will not work ("undefined
value" or something similar).

Any clue regarding this ?

jgdasilva;1848225 Wrote: 
> On 08/28/2009 12:56 AM, JeromeBuyle wrote:
> 
> > Hello there,
> >
> > I have a PickList field in my form that I want to fill with a list
> of
> > values.  Let's call that field "department".
> > The values must be dynamically obtained from a multi-valued
> attribute
> > of a given Organizational Unit.  Let's call that attribute
> > "list-of-departments".  I have a DAL entity that exposes the object
> > class (Organizational Unit) and its attribute.  Let's call the DAL
> > entity "OU" and let's call the exposed attribute key
> > "list-of-departments" (like the attribute itself).
> > Of course, I have a field that contains the DN of the Organization
> Unit
> > which I want to get the list-of-departments from.  Let's call that
> field
> > "DepartmentSource".
> >
> > Here's what I do : I configure on the Department field an onload
> event
> > with this simple expression :
> >
> > Code:
> > --------------------
> >     IDVault.get("Department", 'DepartmentSource', 'OU',
> 'list-of-departments')
> > --------------------
> >
> >
> > Note : The tooltip for -IDVault.get(fieldname, dn, entity-type,
> > attribute) -says "retrieves the value(s) of the attribute for the
> given
> > entity.  The result will be an array of values.  These will be placed
> in
> > the chosen field").
> >
> > So, as far as I understand, my expression should fill the field
> > "Department" with the list of values obtained from the
> > "list-of-departments" attribute of the "DepartmentSource" entity,
> which
> > is of type "OU".
> >
> > Problem is : the list remains blank when the form is displayed.
> >
> > Am I not understanding something here ?  Is there an additional step
> to
> > take ?
> >
> > Thanks for any hint regarding this.
> >
> > Jerome
> >
> > Note : Alternatively, can anyone direct me to a more "task oriented"
> > set of documentation/guides, as I'm finding the Design Guide is
> really
> > an exhaustive review of available options but doesn't give much
> insights
> > as to what options would be use in what given context.
> >
> >
> 
> 
> field.setValues(IDVault.get("Department", 'DepartmentSource', 'OU',
> 'list-of-departments'));


-- 
JeromeBuyle
------------------------------------------------------------------------
JeromeBuyle's Profile: http://forums.novell.com/member.php?userid=8585
View this thread: http://forums.novell.com/showthread.php?t=384498

0
JeromeBuyle
8/28/2009 8:06:02 AM
"ERROR [VirtualDataAccess] Ldap error getting attribute for object:
DepartmentSource.  Error: javax.naming.InvalidNameException:
DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining
name 'DepartmentSource' javax.naming.InvalidNameException:
DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining
name 'DepartmentSource'"

The above error shows that the 'DepartmentSource' is being passed as
string and not as a DN value

try 
var OUDN = form.getValue(<fieldname>) //--> this fieldname should be
the field where the OU DN is available in the form.

then use 
field.setValues(IDVault.get("Department", OUDN,
'OU','list-of-departments'));
	

hope this helps.


-- 
----------------------------------------
-eDir4ever :)
------------------------------------------------------------------------
edir4ever's Profile: http://forums.novell.com/member.php?userid=28533
View this thread: http://forums.novell.com/showthread.php?t=384498

0
edir4ever
8/28/2009 8:26:02 AM
OK, this work.

I don't quite understand why using DepartmentSource (which is of type
DN) without quotes gives an error, whereas passing its value to another
variable and then using that variable without quotes does work.

But many thanks anyway !

J.

edir4ever;1848440 Wrote: 
> "ERROR [VirtualDataAccess] Ldap error getting attribute for object:
> DepartmentSource.  Error: javax.naming.InvalidNameException:
> DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining
> name 'DepartmentSource' javax.naming.InvalidNameException:
> DepartmentSource: [LDAP: errorc code 34 - Invalid DN Syntax]; remaining
> name 'DepartmentSource'"
> 
> The above error shows that the 'DepartmentSource' is being passed as
> string and not as a DN value
> 
> try 
> var OUDN = form.getValue(<fieldname>) //--> this fieldname should be
> the field where the OU DN is available in the form.
> 
> then use 
> field.setValues(IDVault.get("Department", OUDN,
> 'OU','list-of-departments'));
> 	
> 
> hope this helps.


-- 
JeromeBuyle
------------------------------------------------------------------------
JeromeBuyle's Profile: http://forums.novell.com/member.php?userid=8585
View this thread: http://forums.novell.com/showthread.php?t=384498

0
JeromeBuyle
8/28/2009 8:56:01 AM
Reply:

Similar Artilces:

Mutli-valued attribute to multi-valued attribute
We want to synchronize a multi-valued attribute (created by our own) to a multi-valued attribute in the other edirectory store. But when we are adding attributes we only have the changed values. The previous one is lost. When deleting one value in the Identity Vault then it removes the attribute from the object. Any ideas ? > We want to synchronize a multi-valued attribute (created by our own) to a > multi-valued attribute in the other edirectory store. But when we are > adding attributes we only have the changed values. The previous one is > lost. When deleting ...

Single Value to Multi Value attribute
Hi all I have an attribute 'source', in my eDirectory dn: cn=schema changetype: modify add: attributeTypes attributeTypes: ( source-oid NAME 'source' DESC 'to capture the source where the user or group is pulled from' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) - I need to modify this attribute from Single valued to Multi-value attribute, - I also need to modify the name of this attribute from 'source' to 'uniqueSource' can any one please give me the exact syntax for the the above modifications ...

unable to evaluate values in an multi-valued attribute
Dear Forum, we are running UA 4.0.1. We have to search through all values of an given attribute for evaluation purpose. According to the documentation either form.getValues() and idvault.get should return an array when multiple-values are found. Unfortunately this seams not to work. var contracts = IDVault.get(null, dn, "eCampus-User", "eCAssigmentsJStr"); form.setValues("AssigmentJStrs", contracts); var numOfContracts = contracts.length(); Testing has shown that the variable contracts is set correct, 'cos the form field AssigmentJStr is sh...

Single Value Field to MultiValue Field - Reverse Multi to Single storing all Values
begin 644 rule.txt M"3QR=6QE/@T*"0D\9&5S8W)I<'1I;VX^57-E<B`M(&-O;G9E<G0@;75L=&DM M=F%L=65D($1E<V-R:7!T:6]N('1O('-I;F=L92!V86QU92`F;'0[)FQT.R!S M97!A<F%T960\+V1E<V-R:7!T:6]N/@T*"0D\8V]N9&ET:6]N<SX-"@D)"3QO M<CX-"@D)"0D\:68M8VQA<W,M;F%M92!O<#TB97%U86PB/E5S97(\+VEF+6-L M87-S+6YA;64^#0H)"0D)/&EF+6-L87-S+6YA;64@;W`](F5Q=6%L(CY'<F]U M<#PO:68M8VQA<W,M;F%M93X-"@D)"3PO;W(^#0H)"0D\;W(^#0H)"0D)/&EF M+6]P+6%T='(@;F%M93TB1&5S8W)I<'1I;VXB(&...

Single Value Field to MultiValue Field - Reverse Multi to Single storing all Values
Hi All I have implemented a rule that converts the multivalued Description field to a single valued field in AD (See Attached rule) James Miller - Dec 2004 << Mario Kardum - 10 Feb 2004 << Amanda Saintsbury - June 2005 << The result is as above All good so far. Now I want to create a rule to break up and replace the single value field above to a EDir multivalue Field James Miller - Dec 2004 Mario Kardum - 10 Feb 2004 Amanda Saintsbury - June 2005 I presume I need to use XPATH to create the Multivalue entries Does anyone have an idea? Regards ...

op-attr when only removing value from multi-value attribute
IDM 3.5 When I remove only a value from a mulit-value attribute, condition "op-attr available" is FALSE, shouldn't this result as TRUE? Never noticed this behaviour in previous versions of IDM. Any hints? Thanks Rudi --- Trace snippet --- RBM-Manager ST:Applying policy: Sub-ET2-Determine resource-bundle role actions. RBM-Manager ST: Applying to modify #1. RBM-Manager ST: Evaluating selection criteria for rule 'Check change in ResourceBundles'. RBM-Manager ST: (if-op-attr 'rbmSubObjects' available) = FALSE. RBM-Manager ST: Rule rejected. RBM...

Strip extra values of multi-valued field CN
Various user objects in my tree have multiple values in the CN field. I would like to strip out all but the first one. I tried setting CN to a local variable then looping through the current-node's to see if I had a multi-valued CN, but cannot figure out how to go back and actually strip out all the extra names from my CN attribute w/out causing an error message. Code I am using to identity a multi-valued CN is here. I think I'm close to what I need, but need a little push to get that CN stripping piece put to rest. The first part of the code with the HoldCN and Strip...

Write GroupMembership values to custom multi-value attribute
I need to be able to take the multiple group membership values of a user and write them to a custom multi-attribute called "CTGroups". The problem I am running into is if you add two or more groups to a user at once, it will only grab the first group and skip all the others. If I add the groups one at a time, I am ok but I cannot rely on our user community to add just one group at a time. Any help would be appreciated . -- mlarocco Depending on exactly what you are trying to do and where you are trying to do it, you'll either need to use For Each or Clone Oper...

Converting single-valued attribute to normal (multi-valued)
In order to add additional attributes to a User object I have created an Auxiliary Class. Within that class I created a single-valued numeric string with an ASN1 ID. Due to changing requirements it is now necessary to change this attribute to a multi-valued case ignore string. I usually use Designer to do work such as this but, as I'm having some problems, what I describe here is done with iManager (to remove Designer from the equation). There was one object in my tree utilising this auxiliary class (we're still in development) which I have deleted. I then deleted the aux...

Setting multi-value attribute values to query results
I am writing a policy where I need to run a query to get a list of one or more DNs, then place those DNs as the values of a multi-valued attribute in my destination datasource. How do I do this? Can I use the do-add-dest-attr-value action and just specify the query as the values to add, or do I need to place the results of the query in a local variable and do something with that? I'm using IDM 3.5. Here is the query that I'm running: <token-query class-name="Locality"> <arg-dn> <token-parse-dn dest-dn-format="dest-dn" src-dn-form...

Using specific values from multi-valued attributes via LDAP?
I understand how to inject LDAP attribute data in to the authentication process via the form fill, but is there a way to select a specific value from a multivalued attribute? Say for example that I have an attribute called "myPasswords" that has multiple string values specifying a URL and a stored password. I'd need to be able to search for the value needed for the URL I'm authenticating to, then parse out the password section of that string and inject it in to the "password" box in the form. Possible? Not possible? ---------------------------------...

How to tell if an Attribute can hold multi-valued or single valued
Anyone know? If it already populated with data, it is easy to tell. But what if it does not have data? How can you tell? thanks, lee franke You would have to check the schema programatically. There is an attribute on the schema called 'isSingleValued' that will tell you if the attribute is multi-valued or not. MSDN LinkRyan DunnWeblog The BookLDAP Programming Help...

attribute a value to a hidden field with JScript and fetch the value on postback
is it possible to attribute a value to an existing hidden field and on postback fetching this value? Thank you very much for any help! Fabian Do you mean append or add the value to a field?document.formName.elementName.value = "asdf";Not sure what you are asking exactly...EricPascarello.com | Twitter epascarello | LinkedIn that's it. But if I do this and on postback I want to capture the value like this Dim test As String = HttpContext.Current.Items.Item("selectedTreeviewNodeId") there is nothing in it... :-( What I am doing wrong? Thank you for some further a...

If Not value or value then....
Hi all,I want to write a simple IF Not then statement in ASP.net 2.0 and I would like some help please.  If Not ntuser = "DOMAIN\ntuser" Or ntuser = "DOMAIN\ntuser2" Then Panel1.Visible = False End If Doesnt work, can you tell me where i'm going wrong please?many thanks.  The first place you're going wrong is in telling us it "doesn't work" without providing any details. JeffPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue. Use Not as stated below. It ...

Web resources about - PickList field with values from a multi-valued attribute - novell.id-manager.userapp

Plug Power Signs Multi-Year ReliOn Fuel Cell Contract With Communications Company Valued at $20M
... N.Y. and SPOKANE, Wash. Plug Power Inc. , a leader in providing clean, reliable energy solutions, today announced that it has executed a multi-year ...

Resources last updated: 11/21/2015 11:56:31 AM