We have a requirement to populate all the locations (Location Details stored in LDAP) as a drop-down in Identity Portal create user form.
Their are around 1000 locations stored, which needs to be populated up in Identity Portal Create User Form either alphabetically or should show some best matches when user types some keywords. Example: If user types in "New" New York or New Jersy or any other with keyword New should populates as the options.
Any ideas or if any one has achieved some similar requirement?
Thanks in advance!!!
Hi All ,
I am working on a similar requirement. Trying to populate Organizations in the Self Registration form from LDAP.
What would be the best approach to troubleshoot this? Apologies, I am new to Identity Portal.
You can use LDAP plugin for this purpose.
Add change handler in form to send a dynamic query to LDAP to populate the drop-down with ldap query result based on LDAP query.
Please refer the following link
Identity Portal LDAP Search Plugin.docx
Based on Searchable list or dropdown it work well with New User who make a new selection on Organization field.
But how about existing User who assigned with an Organization value, then how the dropdown able to show existing organization value ?
Thanks a lot. Looks great, and will try to implement the similar.
I am not very clear about your query.
For existing user, you might have saved organization value in user attribute so, in this case, why do you even want to invoke ldap plugin why not simply display the stored organization value.
On the other note, this discussion provides the insight about how you can invoke the LDAP API from Identity Portal.
How you want to query the LDAP and how many queries you make to LDAP is your business decision than a functionality discussion.
Let said, we have a Create Employee form with Organization field (Dropdown) and this dropdown data is coming from LDAP query, assuming LDAP Query return 3 rows and dropdown show :-
A HR person uses the Create Employee Form, created employee1 with Organization value OrganizationB.
Now we have Modify Employee form and this form also contain Organization field (it is still using LDAP query to return the 3 rows). Because now we modify Employee and select employee1.
So now on the Organization field(Dropdown), it will show 3 rows because we are still getting the data from LDAP Query. But existing user "employee1" already having the value "OrganizationB"
In Modify Employee form, we have to list down all 3 rows, because we are allow to change the Organization value again.
So the question is how can we show employee1 existing value as "OrganizationB" plus the LDAP query result
You can update the code where you calling the LDAP plugin ( i.e. api.server(...) ).
In this method update where you are populating the drop-down list, make a check if the user already exists or not.
if the user is already existing in the system has a valid organization name stored it its attribute, fetch this value and while population the drop-down list make this entry as the default selected entry and update the drop-down property value with this organization name.
can u share with me, how to set as the default selected value in function initialize(api,prop) ?
For "search list " control use the following code reference to set the default display value.
api.getProp("refOrgSeachList").values = [ api.getProp("refOrgSeachList").options ];api.getProp("refOrgSeachList").value = api.getProp("refOrgSeachList").options.value;
For "Drop down" control use the following code reference to set the default display value.
api.getProp("refOrgDropDownList").values = api.getProp("refOrgDropDownList").options;api.getProp("refOrgDropDownList").value = api.getProp("refOrgDropDownList").options.value;
thanks kumsa, i will test it out.