Select list populated with ldap group membership attributes
Is it possible to query an LDAP group and retrieve all the members of the group?
For example, if I have an LDAP group with members' login name, I want to retrieve all login names and populate a select list so the end-user can choose a login name from the group.
Thanks, alan.
The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
Adjust your query.
Similar Messages
-
Strange Problem in dynamically list population with record group
Hello Room,
I am dynamically populating a single list with 2 record groups. I am having a strange problem. All the code are written in 2 seperate buttons. The code of every button is given below.
Button 1 code:-
DECLARE
rg_reports RECORDGROUP;
rg_name VARCHAR2(40) := 'REPORTS';
vTemp NUMBER;
BEGIN
-- Pls make sure Group doesn't already exist
rg_reports := FIND_GROUP(rg_name);
-- If it doesn't exist then create it and add ur query to it
IF Id_Null (rg_reports) THEN
rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT companyname,to_char(co) from companymaster order by companyname');
end if;
--Populate the Record Group
vTemp:=POPULATE_GROUP(rg_reports);
POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
Delete_Group( rg_reports );
END;
Button 2 Code:-
DECLARE
rg_reports RECORDGROUP;
rg_name VARCHAR2(40) := 'REPORTS';
vTemp NUMBER;
BEGIN
-- Pls make sure Group doesn't already exist
rg_reports := FIND_GROUP(rg_name);
-- If it doesn't exist then create it and add ur query to it
IF Id_Null (rg_reports) THEN
rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT accountname,to_char(co) from accountmaster order by accountname');
end if;
--Populate the Record Group
vTemp:=POPULATE_GROUP(rg_reports);
POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
Delete_Group( rg_reports );
END;
The code is same here only the sql is different in these 2 buttons. Now the problem point.
when i press button 1, I get the list populated ok. when i try to click on the list item and keep the button pressed the list gets scrolled properly.
when i press button 2 after that i get account names well populated in the same list item as well, but this time, when i keep the button pressed the list does not scroll below as in button 1. It does not even allow to select different item from the list of button 2 code.
I tried to clear cache, cookies, exit browser everything and try to run the button 2 first, but still the problem in button 2 code.
Following are my system details.
windows 7 professional edition.
Oracle database 11g on windows 7
Oracle forms 10g patchset 10.1.2.0.2 on windows 7
Browser Netscape Navigator with oracle jinitiator 1.3.1.22
But this form is run by a client side html file where oracle forms 10g is not installed on windows xp. html file is just referring server url to run the module. The file is run on Netscape navigator browser with oracle jinitiator 1.3.1.22
My question is that is this a bug ? if button 1 gets the list item scrolled, why is the problem with button 2 even though i press it first. Here I am deleting the record group also. after the code is over. Initially I thought this may be the character length problem so I took the maximum character length for that list item as given by the 2 columns in database.
Why is the list scrolling not happening in button 2 but in button 1 with same codes on both ?
Anybody please help me.The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
Adjust your query. -
RSA authentication with LDAP group mapping
Greetings,
I'm trying to set up RSA authentication with LDAP group mapping with ACS Release 4.2(1) Build 15 Patch 3.
The problem I'm having is that my users are in multiple OU's on our AD tree. When I only put our base DN in for User Directory Subtree on ACS, it fails with a "External DB reports about an error condition" error. If I add an OU in front of it, then it will work fine.
As far as I know, you can only use one LDAP configuration with RSA.
Any thoughts on this?@Tarik
I believe your suggestion is the only way i'm going to get this to work. I ran across a similar method just this week that I have been working on.
I was hoping for dynamic mapping with the original method, but I haven't found any way to make it happen. I have resorted to creating a Radius profile on the RSA appliance for each access group I need. Using the Class attribute, I then pass the desired Group name to the ACS, i.e. OU=Admins, and that seems to work.
Thankfully, I have a small group of users that I am attempting to map. I will only map those who need elevated priviliges to narrow down how many profiles I will have to manually create. Likewise, our Account Admin will have to determine who gets assigned a particular access group.
I would still prefer to do this dynamically.
Scott -
Revision: 3246
Author: [email protected]
Date: 2008-09-17 15:31:25 -0700 (Wed, 17 Sep 2008)
Log Message:
Fix fasttrack bug SDK-16910 - Simple List populated with strings throws RTE. This is fallout from the Group/DataGroup split. DefaultItemRenderer now uses a TextBox instead of a Group to show the list data.
QE: Any List tests that depended on the default item renderer to support anything other than text must be updated.
Bugs: SDK-16910
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-16910
http://bugs.adobe.com/jira/browse/SDK-16910
Modified Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/DefaultItemRenderer.mxmlBTW, I do not experience the bug you had mentioned at
http://www.cs.rit.edu/~cxb0025/flex/TreeControlBugs.html
Can submit a video of my actions recorded -
How to verify user LDAP group membership
Hi,
we are attempting to determine if a user is a member of a specific LDAP group in our directory and if the user is a member it should return TRUE else FALSE (this is done by defining the LDAP attribute 'CN' (property) which returns a result 'CN=<UserName> or returns 'getting 0 entries'. The query we have is
(&(cn=<username>)(memberOf=CN=<groupname>,DC=domain,DC=com)).
Any pointers on how to do this ?
Thank you.You could do a couple of things...
1) Install dsquery (add remote AD tools to your box) and run something like
dsquery group -u <user name>
Username would be their login name, yours is "swaupadh" for example. This would return a listing of all the groups they are in and you could regex through that output for the group you are looking for. Use either the Execute Powershell or Execute Windows Command activity here.
2) Use powershell functions and powershell capability to check for group membership, something like this:
function Get-GroupMembership($DN,$group){
$objEntry = [adsi]("LDAP://"+$DN)
$objEntry.memberOf | where { $_ -match $group}
//EXAMPLE CALL
Get-GroupMembership "Cn=kazun,dc=contoso,dc=com" "Backup Operators"
Then you can regex through the output for the "True" or "False" word and run with that.
Either should get you what you want. -
Dynamic select list as APEX plug-in custom attribute?
I'm developing a region plug-in in APEX 4.0.1. I wanted to make one of the custom attributes a select list where the options offered were the current application list templates (queried from the <tt>apex_application_temp_list</tt> view: the rendered plug-in region should be styled using a standard list template from the current theme). However, the Select List plug-in custom attribute type only appears to support static lists. Can anyone confirm that I've not missed anything and that this is indeed the case?
If so, it seems that the plug-in will have to rely on developers typing a list template name into a text box, which is far from ideal. (Unless anyone can suggest a workaround?)
Component specific templates can be applied to several built-in component types—lists, calendars, reports—so it would make sense for there to be a similar capability for plug-ins where these are congruent with an existing template type, e.g. by providing a Template Picker plug-in custom attribute type.Hi,
you have not missed anything. Plug-in attributes of type "Select List" just support static values. And I'm not sure if a query based Select List would really help, because what happens if the template is deleted. Or in the reports where it shows if the template is in use.
So I think your second approach to extend plug-in attributes to link to certain shared components (Lists, Templates) is the better way forward, because that will also allow us to know what you are actually referencing and we can use that information in reports, delete operations, ...
Will add it to possible enhancements for 4.1
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf -
Large Select List fails with ORA-6502
Creating a large select list with htmldb_item.select_list_from_query_xl causes an ORA-6502 when the resulting select list contents are larger than an arbitrary value.
For example, if the query for the select list returns a display value of up to 50 characters and a numeric id return value of up to 10 digits, we have to arbitrarily include "where rownum < x" (where x is some arbitrary value) in the query to get results; otherwise when the page is run we get the ORA-6502.
For regular select lists with long results we can get around the problem using htmldb_item.popup_list_from_query but to generate multiselect lists we have to use the htmldb_item.select_list_from_query_xl an include the attribute "multiple".Can we get that added to the API documentation? The spec simply states the function returns a CLOB, implying that it would support the max size of a CLOB supported by the database (4GB in 9iR2 as I recall).
Granted, one should not expect a 4GB web page to be returned using the function call, but a page larger than 32KB isn't entirely unreasonable, especially since this product is geared towards intranet and departmental apps (ie corporate LAN environment).
An alternative enhancement would be to implement multiselects via the popup list mechanism, allowing users to select multiple items as they "page" or search thru the values for that field. -
Increase value of Select List Item with a Button
Hi all,
I've got an apex appli which is working well.
In one report page I use a select list with a LOV, but I want to "enhance" this functionality:
I need a kind of button which increments the item-value of the select list by 1,
so that the user can easily skip to the next value of the LOV without scrolling thru the select list.
Unfortunately I dont't get it working. Has anyone an idea how to realize that?
thanks in advance
FrankHello Frank,
Assuming your select list item is called P1_SELECT, you can define an HTML button, next to the item, that will do the trick.
In the Post Element Text field of P1_SELECT, you can have similar code to the following:
<input type="button" value="Next Value" onclick="$x('P1_SELECT').selectedIndex+=1;" />Hope this helps,
Arie. -
Creating dependent select list menus with javascript
Hi Everybody,
I m creating parent and child select list menu. Value of Child menu would be dependent on the value selected in the parent menu. I have tried to implement a code from adobe labs (http://kb2.adobe.com/cps/149/tn_14924.html) but many strange javascript errors are coming up.
My code is given below:
<?php require_once('../Connections/connection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_connection, $connection);
$query_sector = "SELECT * FROM sector WHERE media_code = 100 ORDER BY sector_desc ASC";
$sector = mysql_query($query_sector, $connection) or die(mysql_error());
$row_sector = mysql_fetch_assoc($sector);
$totalRows_sector = mysql_num_rows($sector);
mysql_select_db($database_connection, $connection);
$query_rsList2 = "SELECT subsector_code, subsector_desc, sector_code FROM sub_sector ORDER BY sector_code ASC";
$rsList2 = mysql_query($query_rsList2, $connection) or die(mysql_error());
$row_rsList2 = mysql_fetch_assoc($rsList2);
$totalRows_rsList2 = mysql_num_rows($rsList2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!-- Dynamic Dependent List box Code for *** JavaScript *** Server Model //-->
<script >
<!--
var arrDynaList = new Array();
var arrDL1 = new Array();
arrDL1[1] = "selList1";
// Name of parent list box
arrDL1[2] = "form1";
// Name of form containing parent list box
arrDL1[3] = "selList2";
// Name of child list box
arrDL1[4] = "form2";
// Name of form containing child list box
arrDL1[5] = arrDynaList;
<%
var txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS; txtDynaListRelation = "sector_code";
// Name of recordset field relating to parent
txtDynaListLabel = "subsector_desc";
// Name of recordset field for child Item Label
txtDynaListValue = "subsector_code";
// Name of recordset field for child Value
oDynaListRS = rsList2;
// Name of child list box recordset
var varDynaList = -1;
var varMaxWidth = "1";
var varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value;
var varCheckLength = 0;
var varMaxLength = 0;
while (!oDynaListRS.EOF){
if (varCheckGroup != oDynaListRS.Fields.Item(txtDynaListRelation).Value) {
varMaxLength = Math.max(varCheckLength, varMaxLength) varCheckLength = 0; }
%>
arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>";
arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>";
arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>";
<%
if (oDynaListRS.Fields.Item(txtDynaListLabel).Value.length > varMaxWidth.length) {
varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value; }
varCheckLength = varCheckLength + 1; varDynaList = varDynaList + 3;
oDynaListRS.MoveNext(); }
varMaxLength = Math.max(varCheckLength, varMaxLength);
%>
//--></script>
<!-- End of object/array definitions, beginning of generic functions -->
<script >
<!--
function setDynaList(arrDL){
var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
var arrList = arrDL[5];
clearDynaList(oList2);
if (oList1.selectedIndex == -1){
oList1.selectedIndex = 0; }
populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
return true; }
function clearDynaList(oList){
for (var i = oList.options.length; i >= 0; i--){
oList.options[i] = null; }
oList.selectedIndex = -1; }
function populateDynaList(oList, nIndex, aArray){
for (var i = 0; i < aArray.length; i= i + 3){
if (aArray[i] == nIndex){
oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
if (oList.options.length == 0){
oList.options[oList.options.length] = new Option("[none available]",0); }
oList.selectedIndex = 0; }
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
//-->
</script>
</head>
<body onload="MM_callJS('setDynaList(arrDL1)')">
<form action="#" method="get" name="form1">
<select name="selList1" onchange="MM_callJS('setDynaList(arrDL1)')">
<?php
do {
?>
<option value="<?php echo $row_sector['sector_code']?>"><?php echo $row_sector['sector_desc']?></option>
<?php
} while ($row_sector = mysql_fetch_assoc($sector));
$rows = mysql_num_rows($sector);
if($rows > 0) {
mysql_data_seek($sector, 0);
$row_sector = mysql_fetch_assoc($sector);
?>
</select>
</form>
<form action="#" method="get" name="form2">
<select name="selList2"></select>
</form>
</body>
</html>
<?php
mysql_free_result($sector);
mysql_free_result($rsList2);
?>
The javascripts errors that I m getting are :
Syntax error test.php, line 20 character 1
'arrDL1' is undefined test.php, line 74 character 3
'arrDL1' is undefined eval code, line 1 character 1
Note: I have bolded the lines where error is coming up.
If more info is needed please tell.
Please Help,
Thanks in AdvanceYou'd probably have to put a copy of the app on apex.oracle.com for a complete diagnosis, but you could maybe just check that the Source Used attribute for teh select list is set to 'Only when current value in session state is null' and not the 'Always' option.
Regards,
John. -
Dynamic select list crashes with php
HI All,
I can't seem to get a dynamic select list to work in
dreamweaver. It completly crashes everytime I try adding it to my
page. I found someone else in the forum who had the same problem
but no one ever responded. I've tried several things including
putting just the record set and dynamic select on it's own page
with no other code on it. It still crashes DW. I also tried coding
it myself by making a listmenu and modifying it so that the option
value equals a PHP echo of a value. It crashed there too. Does
anyone have a piece of code with a working dynamic select list that
uses a record set that I could look at? That way I can see where
I'm going wrong. All I'm trying to do is get a simple drop down
select list of employee names so someone can choose their name to
get commission. It's a one table, 2 fields (first & last name)
record set.
Using DW CS3, php & MySQL.,windows XP Pro
Any help would be really appreciated!AthroughZ wrote:
> I can't seem to get a dynamic select list to work in
dreamweaver. It
> completly crashes everytime I try adding it to my page.
It looks as though you have a corrupt cache file. Follow
troubleshooting
step 4 in the following technote:
http://www.adobe.com/go/tn_19105
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/ -
Dynamic Select List population
I have 2 lists on my form.
First one is populated from LOV...based on the value that is chosen in the first Select List I would like to populate the second LOV. Is this possible?
for example...First Select List has Company Id, Company Name. So to populate the second one I want to use the following query: select event_type_id, event_type_dec from event_type where company_id = "company_id from first select list".
Thanks.Hello,
Take a look at this
How to make LOV's reference other LOV's on the form page
Carl -
Reducing Select list options with keyboard actions - JavaScript help
ApExperts,
My users want a select list with similar functionality to one in MS Access. They want to put the focus on it, then start typing and have their keystrokes 'search' the options. For example, if the select list contains the following entries:
11111
12345
22222
33333
44444
55555
and they type 1 then 2 then 3, they want the element 12345 to be selected, however, an HTML select list widget selects 11111 then 22222 and finally 33333.
I'm hoping JavaScript might be able to do this but I don't know how to code it. I've searched this forum and other web sites but have found nothing useful.
So, is it at all possible and, if so, can you give me an idea of what triggering event to code for and what code to use?
Thanks,
XBTW, that thread continued - with more options - here:
AJAX, Javascript or just good coding? LOV that filters as you type??
If the select list is fixed, you don't need to pull results back from the server as the user types. Then you could try something like this:
http://www.oreillynet.com/pub/a/javascript/2003/09/03/dannygoodman.html
Doug
Message was edited by:
dccase -
I have two select lists.The first one holds the column names of a table and the second one should populate all the distinct values of the column selected in the first list.
In the second select list I have written a query like
SELECT DISTINCT V('P4_TOP_SEARCH') p,V('P4_TOP_SEARCH') r FROM INTERVIEW_DETAILS
where 'P4_TOP_SEARCH' is the session state value and is a column of a table.
I am not getting values but the session state value is populated in select list
Is there any way to do it.Is there anyone to help me out.
-
I need help. I have a case where an LDAP group shows users as members but some of these users do not show the group in their "Member Of" listing when looking under the Home -> Users-> <userid> listing. What could be causing this. The LDAP group was recently added to the server. Thanks.
Stephen,
One returns an array (table) of groups and the other returns a ":" delimited string. Describing them from SQL Plus returns:
FUNCTION MEMBER_OF RETURNS TABLE OF VARCHAR2(32767)
Argument Name Type In/Out Default?
P_USERNAME VARCHAR2 IN DEFAULT
P_PASS VARCHAR2 IN DEFAULT
P_AUTH_BASE VARCHAR2 IN
P_HOST VARCHAR2 IN
P_PORT VARCHAR2 IN DEFAULT
FUNCTION MEMBER_OF2 RETURNS VARCHAR2
Argument Name Type In/Out Default?
P_USERNAME VARCHAR2 IN DEFAULT
P_PASS VARCHAR2 IN DEFAULT
P_AUTH_BASE VARCHAR2 IN
P_HOST VARCHAR2 IN
P_PORT VARCHAR2 IN DEFAULTThanks,
Tyler -
A select list combined with auto-complete?
Hello All,
I am trying to convert an access application into APEX. There is a field on the form where I can look up various car models (Campry, Corola, RAV4, Sienna, etc) via drop down menu (select list in APEX) or by directly typing “Ca” in the field and it gets auto-completed to “Camry”.
Is it possible to implement this feature in APEX? If yes, how?
Thank you,
DanielHi Daniel,
Yes this is possible.
Have a look here: Ajax Autocomplete (Denes Kubicek)
There are some examples circulating, in the above thread you find Denes' example.
Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://www.apex-evangelists.com/
-- http://www.apexblogs.info/
Maybe you are looking for
-
Need assistance in Hyperion Web Analysis Report
Hi All, I am using HFM with Oracle database as the data source for reports and using Hyperion 931 components. I have a requirement in Key Performance Indicators reports (KPI) 1) Need to have a custom column of current year Actuals Vs Plan data 2) Nee
-
Oracle d2k connectivity please read this
i have installed personal oracle 8i on win 98 se but unable to connect from developer 6.0 on the same machine .i cant even create simple forms . i have tried on both windows 98 and windows 95. take for example i want to prepare a simple forms which c
-
How to add new data entry and display old data in the same screen in SM30?
Hi, Experts: We need to use SM30 to maintain a table entry. When I click the button of "New Entries", the table screen becomes blank. I can only add new data but not be able to see the old data existing in the table. How can I have the new line avail
-
hi how can i create a pop up in alv rowselection event. and how can i hide a column in alv ?
-
I have created a new campaign and assigned products , channels and taget group to campaign. i have changed campaign status to ' Released'. When i m trying to send Email to Target Group , that option was grayed out . Please le me know if i need any c