Lookup Fields

Post Author: Blivet
CA Forum: Formula
I am using some complex tables that have one-to-many relationships. In addtion, many fields that need to be grouped are coded. These codes are kept seperately in another table that translates them into Human readable. For example:
MainTable.circumstance = 1;
CodeTable.CodeKey = "CIRC"; (this tells which category of records to read from)CodeTable.KeyCode = 1; (This is the same as the main table)CodeTable.Desc = "While Running"; (This is the human readable correlation to the number 1;
When I do the main query, it just shows the numeric code of couse, but I need the human readable. The problem is the CodeTable has multiple entries with same code, but the "CIRC" determines which CodeKey I need.
The logic I need, as the sql runs, is to go out and get the proper description:
SELECT description FROM CodeTable WHERE CodeKey="CIRC" and KeyCode = 1;
That would be the select statement, but I need this to happen to populate one field. It's almost like I need to create a link between CodeTable.KeyCode and MainTable.circumstance, but I only want it to give me the description from the codeTable where CodeKey = "CIRC". There may be other records in the codeTable that have a KeyCode of 1, but the CodeKey will be "TYPE".
Any help appreciated.

Post Author: bettername
CA Forum: Formula
I think you just need to join them correctly...
If you are getting your data with a SQL query, then it should look like one of the following:
--if the MainTable doesn't have a 'CodeKey' field...
select mt.something, ct.desc from MainTable mt
left join CodeTable ct on ct.KeyCode = mt.circumstance
and ct.CodeKey = 'CIRC'
--if the MainTable does have a 'CodeKey' field...
select mt.something, ct.desc from MainTable mt
left join CodeTable ct on ct.KeyCode = mt.circumstance
and ct.CodeKey = mt.CodeKey
However, if you are doing all your linking in Crystal, you'll want to do the following:
Link your two tables using the KeyCode field.
If you can also link with the CodeKey, then that should be it.  Otherwise, in the Select Expert, use the following:  isnull({CodeTable.CodeKey)) or {CodeTable.CodeKey} = "CIRC"
If you have other fields that link to your lookup table, you'll have to add another reference to the lookup table in the database expert, and replicate the above step(s).

Similar Messages

  • Unable to save lookup field data in SharePoint 2013 online list

    Dear Support,
    I had successfully created provider hosted app and deployed on SharePoint 2013 online site, in my project I created orderservice.asmx.cs web service and write a code for save record on SharePoint
    2013 online list as I mentioned below and calling on App1.js file.
    But I am unable to save lookup field value as mentioned below code
    Customer is a lookup field I want to save data in SharePoint 2013 online list( Order)where I had successfully
    inserted text field  data (Title &
    Special_x0020_Instruction).
    i am getting error as mentioned below
    500 Internal Server Error {"Message":"Invalid web service call, missing value for parameter: \u0027Title1\u0027.","StackTrace":"   at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2
    parameters)\r\n   at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n   at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData,
    IDictionary`2 rawParams)\r\n   at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
    Please let me know the code how to insert lookup field value (Customer)
    in SharePoint online list.
    OrderService.asmx.cs
    Public
    int InsertOrder (Order
    orderRecord)
                pwd.MakeReadOnly();
                clientContext.Credentials =
    new
    SharePointOnlineCredentials (myUserName, pwd);
    try
                  Web
    oWeb = clientContext.Web;
    ListCollection lists = oWeb.Lists;
    List oOrderlist = clientContext.Web.Lists.GetByTitle("Order");
                    clientContext.Load<ListCollection>(lists);
                    clientContext.Load<List>(oOrderlist);
                    ListItemCreationInformation
    itemCreateInfo = new                 ListItemCreationInformation();
    ListItem oListItem = oOrderlist.AddItem(itemCreateInfo);
                    oListItem["Title"]
    = Title;                        listItem["Special_x0020_Instruction"]
    = orderRecord.Instruction;
                        listItem ["Customer"]
    = orderRecord.CustomerId;
                        listItem.Update();
                        clientContext.ExecuteQuery();
    return 1;
    catch
    return -1;
    App1.JS
    $("#Save").click(function
    debugger;
    var OrderProfile = $('#orderprofile').val();
    var CustomerId = $('#exCustomerlist').jqxComboBox('getItem',
    $('#exCustomerlist').val());
    //var Instruction = $('#instruction').val();
            alert(OrderProfile);
            alert(CustomerId);
    var obj = {
    'Title': OrderProfile,
    'Customer': CustomerId }
            $.ajax({
                url:
    "OrderService.asmx/InsertOrder",
                type:
    "POST",
                dataType:
    "json",
                data: JSON.stringify(obj),
                contentType:
    "application/json; charset=utf-8",
                beforeSend:
    function (XMLHttpRequest) {
    //Specifying this header ensures that the results will be returned as JSON.
                    XMLHttpRequest.setRequestHeader("Accept",
    "application/json");
                success:
    function (response) {
                    $(".errMsg ul").remove();
    var myObject = response.d;
                    alert(myObject);
                error:
    function (response) {
                    alert(response.status +
    ' ' + response.statusText +
    ' ' + response.responseText);
    Regards,
    Akhilesh

    Hi Alex Brassington,
    Thanks for your reply.
    I am having the Site Administrator Permission of the public site.
    I am having the permission of Company Administrator of that site but still unable to find
    Device Channel on Site Setting. still I gave the user full control from Site Permission but nothing is happening.
    What should I do next?

  • Retrieving lookup field values from a main table using MDM JAVA APIs

    Hi all,
    am trying to retrieve the main table data...., i could able to retrieve all the data except lookup field values..., iam facing some runtime exceptions and i dont know why exactly it is throwing this exception..., i pasted piece of code where exactly the error is and the exception also.
    in the below sode i set some result set definitions and passing them to retrieveLimitedRecordsCommand. it is showing some exception at retrieveLimitedRecordsCommand.execute(); command.
    //*** Code  ***//
      supportingMainResultDefinitions = new ResultDefinition[] { rdQual ,rdFlat, rdqFlat  };
                                            retrieveLimitedRecordsCommand.setResultDefinition(rd);
                                            retrieveLimitedRecordsCommand.setSearch(new Search(tableId));
                                            retrieveLimitedRecordsCommand.setSession(sessionId);
                                            retrieveLimitedRecordsCommand.setSupportingResultDefinitions(supportingMainResultDefinitions);
                                            try {
                                            retrieveLimitedRecordsCommand.execute();
                                                    PrintRecords.toConsole(retrieveLimitedRecordsCommand.getRecords());
                                                    } catch (CommandException e) {
                                                    e.printStackTrace();
    //***  Below is the Exception raised ***//
    java.lang.UnsupportedOperationException: Unexpected field type -1
            at com.sap.mdm.internal.schema.PropertiesHelper.createField(PropertiesHelper.java:274)
            at com.sap.mdm.internal.schema.PropertiesHelper.convertFrom(PropertiesHelper.java:281)
            at com.sap.mdm.internal.data.RecordMetadata.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordResultSetHelper.convertFrom(Unknown Source)
            at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(Unknown Source)
            at com.sap.mdm.apitutorial.lesson2.RecordsDisplay.getDisplayRecords(RecordsDisplay.java:303)
            at org.apache.jsp.Sample_jsp._jspService(Sample_jsp.java:190)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
            at java.lang.Thread.run(Thread.java:534)
    If anyonw worked on this concept..., please provide me the solution
    Regards
    Praveen k

    Which version are you using?  Can you please try and narrow down to the offending field?  You can do this by limiting the fields you provide to ResultDefinition.

  • How to modify a lookup field-type to use checkbox instead of radiobutton?

    How to modify a lookup field-type to use checkbox instead of radiobutton?
    I would like to modify the behavior for the lookup field.
    Normally you get a screen where it is possible to search through a lookup. The items resulted from the search are listed as radiobutton items. Therefore you can select only one at the time to be added.
    Is it possible to have the items to be listed as checkbox instead? So that you can check multiple items and therefore be able to add multiple items at the time?
    For example:
    To add the user to 10 different groups on MS-AD.
    It is desired to have the ability to check multiple groups to be added instead only one at the time.
    My client would like to use this feature in many other situations.

    Displaying will not be a big deal but with that you have to customize the action class and its working as well.

  • Number of records displayed in the lookup field on webconsole dont change

    Hi All,
    Issue here is-
    When I select a report or process form to select a value for anything and click on the magnifying
    glass (lookup field) in web console, should get all the resources in the page that pops up.
    For now it only displays 10 records per page. I see all the lookups displaying 10 records when clicked on the magnifying glass icon.
    The property ‘global.displayRecordNum.value’ in the xlDefaultAdmin.properties file is set to
    20. So, all other pages display 20 records but all lookup pages on web console
    show only 10 records per page.
    Now the businees users want that the lookup page should display 20 records per page like other pages.
    For recreating the problem you can follow the steps:-
    Operational Reports -> Click on Attestation Process Name magnifying glass-> the page that pops up should display all the resources on one page instead of displaying 10 per page.
    Anyone has any idea on this if it is possible to change it thorugh an attribute in xlDefaultAdmin.properties or something else ?
    Thanks.

    You may add "and rownum < ..." to the default where clause.
    But that will not change the layout of the block. E.g. if you have a 10 record block where you want to display only 3 records, you will see 7 empty records.
    Also, this is not a good idea if you are using record ordering.

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

  • Error occuring on a lookup field in profile page

    Hi All,
    I have a lookup field on the OIM 11.1.1.5.0 create user page. The create user form was working fine and I was able to create users properly. However since today morning, suddenly I am getting a strange error whenever I click on the lookup field to select any value. The query for lookup has not been changed. Its the same as before. But this error keeps popping up on UI directly and then am not able to do anything unless I restart the browser.
    The error is as follows:
    ADF_FACES-60096:Server Exception during PPR, #8[[javax.el.ELException: java.lang.AbstractMethodError: prepareWhereClause
    Caused by: java.lang.AbstractMethodError: prepareWhereClause
    Can some one please help me out with this? The only change that I remember was I had changed OIMServer.jar file with another version but I have re-stored the original file which I had a backup of. But it still throws this error.Thanks,$id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    I increased the log level of the oracle.adfinternal to TRACE-32. I can see the following additional things in the logs after the 60096 exception that arises when I click on the Search button in the user role field:
    [2013-01-01T11:16:16.585+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.view.faces.lifecycle.LifecycleImpl] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.view.faces.lifecycle.LifecycleImpl] [APP: oim#11.1.1.3.0] [SRC_METHOD: _executePhase] [URI: /admin/faces/pages/Admin.jspx] Executing phase RESTORE_VIEW 1
    *[2013-01-01T11:16:16.609+01:00] [wls_oim1] [TRACE] [] [oracle.iam.identitytaskflow.logging] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.iam.taskflows.utils.CommonUtils] [APP: oim#11.1.1.3.0] [SRC_METHOD: getCustomProperty] [URI: /admin/faces/pages/Admin.jspx] Cannot find the resource global.Lookup.UserRole in the bundle.*
    [2013-01-01T11:16:16.609+01:00] [wls_oim1] [WARNING] [] [org.apache.myfaces.trinidad.component.TreeState] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [APP: oim#11.1.1.3.0] [URI: /admin/faces/pages/Admin.jspx] Saved child count does not match current count (was 2, now 4)
    [2013-01-01T11:16:16.610+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [APP: oim#11.1.1.3.0] [SRC_METHOD: pushContextChange] [URI: /admin/faces/pages/Admin.jspx] Context change about to be pushed. Current stack size: 0
    [2013-01-01T11:16:16.610+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [APP: oim#11.1.1.3.0] [SRC_METHOD: pushContextChange] [URI: /admin/faces/pages/Admin.jspx] Context change about to be pushed. Current stack size: 1
    [2013-01-01T11:16:16.610+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.controller.application.AdfcPageResolver] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.controller.application.AdfcPageResolver] [APP: oim#11.1.1.3.0] [SRC_METHOD: getPhysicalURI] [URI: /admin/faces/pages/Admin.jspx] ADFc: viewId [LookupByQueryPopup-TF/LookupByQueryPopup] resolved to [taskflows/lookupbyquery/LookupByQueryView.jsff]
    [2013-01-01T11:16:16.610+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [APP: oim#11.1.1.3.0] [SRC_METHOD: pushContextChange] [URI: /admin/faces/pages/Admin.jspx] Context change about to be pushed. Current stack size: 2
    [2013-01-01T11:16:16.610+01:00] [wls_oim1] [TRACE] [] [oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [SRC_CLASS: oracle.adfinternal.view.faces.context.ApplicationContextManagerImpl] [APP: oim#11.1.1.3.0] [SRC_METHOD: popContextChange] [URI: /admin/faces/pages/Admin.jspx] Context change about to be be popped. Current stack size: 3
    [2013-01-01T11:16:16.611+01:00] [wls_oim1] [NOTIFICATION:16] [] [oracle.adfinternal.controller.util.LogUtils] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [APP: oim#11.1.1.3.0] [URI: /admin/faces/pages/Admin.jspx] Key mismatch: expected Process Region but got JSF Phase %s
    [2013-01-01T11:16:16.611+01:00] [wls_oim1] [NOTIFICATION:16] [] [oracle.adfinternal.controller.beans.ManagedBeanFactory] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: xelsysadm] [ecid: 004oZTf^PWj1baXh1tnJ8j0002mn000WN_,0:1] [APP: oim#11.1.1.3.0] [ADF_MESSAGE_CONTEXT_DATA: Bean Name=shellRequestContext;#;Bean Class=oracle.idm.shell.context.ShellRequestContext;#;Bean Scope=request;#;Taskflow Id=null] [ADF_MESSAGE_STATUS: begin] [ADF_MESSAGE_ACTION_DESC: ] [URI: /admin/faces/pages/Admin.jspx] [ADF_MESSAGE_ACTION_NAME: Instantiate Bean] Instantiate Bean
    I am not sure if the line in bold saying cannot find resource global.Lookup.UserRole is the root cause or not. But if it is, then any idea what might be causing it? Can it be related to the OIMServer.jar replacement I had done earlier?
    Thanks,
    $id

  • Invalid data has been used to update the list item. The field you are trying to update may be read only (Lookup Field).

    Hi.
    I am getting below error while adding value to look-up field.
    Invalid data has been used to update the list item. The field you are trying to update may be read only.
    I have tried many forums ans post but didn't come to know what's the root cause of issue. I am also posting Code for creating and adding lookup field.
    CAML to create lookup field (It works Fine)
    string lkproductNumber = "<Field Type='Lookup' DisplayName='Product Number' StaticName='ProductNumber' ReadOnly='FALSE' List='" + pNewMaster.Id + "' ShowField='Product_x0020_Number' />";
    Code to insert value to lookup field
    ClientContext client = new ClientContext(SiteUrl);
    client.Load(client.Web);
    client.Credentials = new NetworkCredential(this.UserName, this.Password, this.Domain);
    // Lookup Lists
    List pmList = client.Web.Lists.GetByTitle("Product_Master");
    //List Conatining Lookup Columns
    List piList = client.Web.Lists.GetByTitle("Product_Inventory");
    client.Load(piList);
    query.ViewXml = "<View/>";
    ListItemCollection collection = pmList.GetItems(query);
    client.Load(collection);
    client.ExecuteQuery();
    int prodid=0;
    foreach (ListItem item in collection)
    if (Convert.ToString(item["Product_x0020_Number"]) == ProductNumber)
    { prodid = Convert.ToInt32(item["ID"]); }
    ListItem piItem = piList.AddItem(new ListItemCreationInformation());
    piItem["Product_x0020_Number"] = new FieldLookupValue() { LookupId = prodid };
    piItem.Update();
    client.ExecuteQuery();
    Exception Detail
    Microsoft.SharePoint.Client.ServerException was caught
    Message=Invalid data has been used to update the list item. The field you are trying to update may be read only.
    Source=Microsoft.SharePoint.Client.Runtime
    ServerErrorCode=-2147352571
    ServerErrorTypeName=Microsoft.SharePoint.SPException
    ServerStackTrace=""
    StackTrace:
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
    at WebServiceProviders.ClientServices.NewProductInventory() in Z:\.............ClientServices.cs:line 889
    InnerException:
    Quick response is highly appreciated.
    Thanks
    Mehar

    Try some thing like below,
    your data value that needs to be update should be in this format "ID of the lookup";#"Title of the Lookup" 
    For example,
    listItem["Product_x0020_Number"]
    = "1;#iPhone";
    listItem["Product_x0020_Number"]
    = "2;#Mobile";
    Hope this helped you....

  • Event Receiver to create a List based on a custom template and on lookup field

    Hi
    I would like to have an Event Receiver who is firing by addItem in a list calls Seminarliste and is creating each time a new list based on three columns for add.Lists("Title of the list", "Description of the list", "Custom List
    Template")
    I have a Problem to get the LookupField Title and I am getting a Problem to create a list.
    If I debug the code the bold line creates an exception ;(
    The following code I have produced:
            public override void ItemAdding(SPItemEventProperties properties)
                base.ItemAdding(properties);
                SPWeb spCurrentSite = properties.OpenWeb();
                SPSite siteCollection = new SPSite("http://win-ue32d37ap2n");
                SPWeb web = siteCollection.OpenWeb();
                SPListCollection lists = web.Lists;
                String curListName = properties.ListTitle;
                if(curListName == "Seminarliste")
                    SPListItem curItem = properties.ListItem;
                    String curItemListName = properties.AfterProperties["Title"].ToString();
                    String curItemDescription = properties.AfterProperties["Beschreibung"].ToString();
                    // Lookup field with Option to Chose a template name
                    String curItemTemplate = properties.AfterProperties["Template"].ToString();
                    SPListTemplateCollection listTemplates = siteCollection.GetCustomListTemplates(web);
                    //Error by following line ...
    SPListTemplate myTemplate = listTemplates[curItemTemplate];
                    web.Lists.Add(curItemListName, curItemDescription, myTemplate);
    If somebody had a similar problem in the past and could advice it would be most appreciated ;-)
    Thanks in advance ;-)
    Kind regards Michael Damaschke

    If I understand correctly, the field you use to select the template name is a lookup field? If so, then the problem is the lookup field value is not the name of the template. It is an SPFieldLookupValue, which contains the ID and the string of the lookup.
    So you want to separate the template name, like this:
    if (item["LookupField"] !=
    null)
         string fieldValue = item["LookupField"].ToString();
         SPFieldLookupValue value =
    new SPFieldLookupValue(fieldValue);
         int lookupListItemID = value.LookupId;
         string lookupListValue = value.LookupValue;
    IF you look at the fieldValue above, you will see it is something like an integer, followed by delimiter ;# and then your template name. you can always just parse the string at the ;# as well if you were so inclined.

  • Updating values dynamically in an user attribute which is lookup field

    Hi All,
    Can I have a pre process event handler to update the values in the lookup field on my create user page? I have two user attributes - one is the default organization and the other is a user created Country attribute. Both of these are Lookup fields. I want to update the country lookup field by checking what is selected in the organization lookup field. Is this possible in OIM?
    Not sure if pre process event handler is the way to go but this is what I want to achieve. Can anybody guide me regarding the same?
    Thanks,
    $id

    OK, here's my shot at a walkthrough... let me know if I missed any steps.
    1. From your original post, you are using two lookup fields. I'm use a base VM for testing, so I needed to create two. I went with City and State (I know they are OOB, but this is just an example).
    - Created Lookup.Custom.City and Lookup.Custom.State Samples:
    Lookup.Custom.City
    Code Key-Decode
    Miami-Florida
    Orlando-Florida
    New Orleans-Louisiana
    Lookup.Custom.State
    Code Key-Decode
    Florida-Florida
    Lousiana-Louisiana
    - Creating Custom UDF Attributes: Advanced->User Configuration->Actions->User Attributes (LOV's)
    -- Office City and Office State
    2. Use weblogicExportMetadata.sh to export /metadata/iam-features-requestactions/model-data/CreateUserDataSet.xml
    3. Edit CreateUserDataSet.xml to add:
    <AttributeReference name="Office State" attr-ref="Office State" available-in-bulk="false" type="String" length="20" widget="lookup" lookup-code="Lookup.Custom.State" required="false" mls="false"/>
    <AttributeReference name="Office City" attr-ref="Office City" type="String" length="30" widget="lookup-query" available-in-bulk="false">
    <lookupQuery lookup-query="select City.LKV_ENCODED as City from (Select LKV_ENCODED , LKV_DECODED  from LKU LKU, LKV LKV where lku_type_String_key = 'Lookup.Custom.City' and lku.lku_key = lkv.lku_key) City, (Select LKV_ENCODED, LKV_DECODED from LKU LKU, LKV LKV where lku_type_String_key = 'Lookup.Custom.State' and lku.lku_key = lkv.lku_key and lkv_decoded='$Form Data.Office State') State where State.LKV_ENCODED = City.LKV_DECODED order by City" display-field="City" save-field="City"/>
    </AttributeReference>4. Use weblogicImportMetadata.sh to import CreateUserDataSet.xml
    5. Run ./PurgeCache ALL (same directory)
    6. Go to request - create user (this example is for request based provisioning)
    7. If all went ok, when you select State, let's say Florida, then when you then click on city lookup, you will only see Orlando and Miami. If you toggle the state to Louisiana, you'll need to click search again on city and New Orleans should be the only one that comes up.

  • How to create Lookup field in user form in OIM 11g - Urgent

    Hi Experts,
    How to create Lookup field in User Form - OIM 11g.
    Pls. provide your support on priority.
    Regards
    Karan

    Thanks all for your suggestion.
    Our requirement, is we need to have a user defined field similar to how its there in "Organisation".
    For example we need to create an user defined field like "Service Holding" which holds different services say like Service 1, Service 2, Service 3 etc.
    Under each service there are multiple roles....
    Eg:
    Service 1 - Role 1, Role 2, Role 3
    Service 2 - Role 4, Role 5
    Service 3 - Role 6, Role 7, Role 8
    Is there a way to store multi-valued attribute in OIM UDF? If so, pls. guide us
    If its not possible we would need to create a Lookup field (something similar to Organization or Manager). User clicks on the button (lens button), which should invoke an API wherein he can select specific Roles and save in User. Eg. like Service 1 - Role 1#Service 2 # Role 5 and store in the backend database.
    Is this possible. Pls. guide.
    Regards,
    Karan

  • Lookup Field with a Lookup Query on Process Form in OIM 11gR2

    Does anyone know how to render a field on a process form so that when modifying the field for the resource a "Search and Select" window appears and allows the user to search for the value based on the lookup query defined for the field in Design Console? The lookup field has been defined as a lookup query through Design Console and tested by previewing the form in DC. When creating the Form through OIM System Administration the field is created as a Text Field, not a Lookup. Creating a new Field through OIM System Administration only allows you to create the field using a lookup code not using a lookup query. I've tried to remove / add the field in the UI (create sandbox, customize, etc.) and add it back as a Input LOV but it doesn't get added and the error in the logs say java.lang.RuntimeException: Input LOV is not supported for this attribute, please make this attribute searchable in order to drop this as an input LOV. The field is defined as searchable in the Form Designer in OIM System Administration. In fact I can't even add it back as an ADF Input Text Field w/ Label, I suspect I'll have to "Regenerate" the form to even get it back on the form. Any help is appreciated. Next step is to try to export the sandbox, massage and import.
    Thanks,
    Ryan

    Finally got an answer out of Oracle after trying to figure this out as well. Apparently Lookup Queries are not supported at all by the R2 Web UI. They indicate that according to product management this will not be fixed.

  • Prepopulate Lookup Field of parent From - using PrePopulationAdapater - OIM 11.1.2

    Hi Experts,
    please help me in implementing the below requirement, (Need to prepopulate Lookup field present in parent form of disconnected application instance.)
    Requirement
    1) Requestor logs into Identity Self service console
    2) searches for a eligible user(Beneficiary) and requests disconnected application instance from catalog
    3) On check out, parent form of disconnected application instance is displayed.
    4) Here, I have a field visible as dropdown list (this is of Lookup type field and is added in the parent form while creating disconnected app instance and is visible as dropdown list in parent form when checked out)
    5) This dropdown list should be prepopulated with values based on Beneficiary attribute values
    I already tried creating a class implementing "PrepopulationAdapter". With this I am able to prepopulate text fields of parent form. Same I tried to prepopulate dropdown of parent form, but couldn't do it.
    Below is sample code used
    public class testattr implements PrePopulationAdapter
      public testattr()
    super();
      public Serializable prepopulate(RequestData paramRequestData)
       String Str1 = "DropDownValue1";
       String Str2 = "DropDownValue2";
    List<Beneficiary> benUserList = paramRequestData.getBeneficiaries();
    logger.info("***** END - BADGE TEST *****");
    ArrayList<String> plist = new ArrayList<String>();
    plist.add(prePopUserID);
    logger.info("adding plist");
    return plist; //WHAT OBJECT SHOULD BE RETURNED HERE..
    In the above sample code, what should be the object returned, to populate DROPDOWN list in parent form(in the UI of check out page of catalog.)
    If prepopulating text field, return a String object would work. So, what should be object returned to populate DROPDOWN list.
    Please help me in prepopulating dropdown list of parent form.
    Thanks in advance..

    Hi Nishith,
    Thanks for reply...
    Yes. I tried returning codekey and hence in the UI the decode(Meaning) of the codekey got displayed. Its working only if return only ONE string.
    But I wanted to return more than 1 string. So in the drop down more than 1 Group is displayed.
    So, just gave a trail and error... tried returing List, String array and got an error saying "IAM-2050062 : The value of the attribute <Attribute Name> is not of the required type String"
    Regards,
    Praveen

  • Passing Multiple Selected List Items to a "New Item" Form in Another List with Multiselect Lookup Field

    Hi!
    Version Info:  SharePoint 2013 Server Standard (*BTW...I do not have access to Visual Studio*)
    I have two lists, let's call them
    -Assets
    -Asset Checkouts
    "Assets" is the parent list, and "Asset Checkouts" has a lookup column (multiselect) which is tied to the serial # column in the "Assets" list.
    Basically, what I need to accomplish is this:  I would like to be able to select multiple list items in the "Assets" list, and create a new item in "Asset Checkouts", and pre-fill the multiselect lookup column in the NewItem form
    for "Asset Checkouts" with the values from the selected items in "Assets".
    Any ideas or suggestions on how to do this would be most appreciated!
    Thanks!

    Hi,     
    According your description, you might want to add new item in "Asset Checkouts" list when selecting items in "Assets" list.
    If so, we can achieve it with SharePoint Client Object Model.
    We can add a button in the "Assets" list form page, when selecting items, we can take down the values of columns of the selected items, then click this button which will create
    new item in "Asset Checkouts" list with the values needed.
    Here are some links will provide more information about how to achieve it:
    Use
    SP.ListOperation.Selection.getSelectedItems() Method to get the list items being selected
    http://msdn.microsoft.com/en-us/library/ff409526(v=office.14).aspx
    How to: Create, Update, and Delete List Items Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Add ListItem with Lookup Field using Client Object Model (ECMA)
    http://notuserfriendly.wordpress.com/2013/03/14/add-listitem-with-lookup-field-using-client-object-model-ecma/
    Or if you just want to refer to the other columns in "Assets" list when add new item in "Asset Checkouts" list, we can insert the "Assets" list web part into the NewForm page
    of the "Asset Checkouts" list, then when we add new item in the "Asset Checkouts" list, we will be able to look through the "Assets" list before we select values for the Lookup column.
    To add web part into the NewForm.aspx, we need to find the button "Default New Form" from ribbon under "List" tab, then we can add web part in the NewForm.aspx.
    In the ribbon, click the button “Default New Form”:
    Then we can add web part into NewForm.aspx:
    Best regards
    Patrick Liang
    TechNet Community Support

  • Lookup field in external data-object????

    Hi All.
    Is it possible to create lookup field in data object with external data-source?

    Hi ,
    yes you can create.look ups for any Data Objects.
    Regards
    Siva Sankar

  • Does Access 2013 Web App support multi-value lookup fields?

    I hope someone can please help me with this as I've not been able to find the answer by searching this site, nor elsewhere on the web. I have Access 2013 open connected to my web app on Sharepoint Skydrive with a table open in 'edit table' mode. When I add
    a new lookup field I don't see any option to make it a multi-value lookup field. Is there no support for that in web apps or am I doing something wrong?
    Cheers, Henk.
    Cheers, Henk.

    This is what I use in the Parent RowSource:
    This in the parent child relationship
    In the row source query from the child, I have a simular expression. By inverting the boolean 'childToggler' I can force the child-form to requery. Because the boolean is in the session table record (which is part of the child form recordsource query as
    well), the boolean will be inverted in both and won't disrupt the relationship.
    Besides the toggler this relationship only contains an ID with preceding zero's, but the expression can contain pretty much everything. 

Maybe you are looking for