Autolookup to SQL Database - need syntax for referenced fields in subform

Comments

3 comments

  • Avatar
    Manoj Kumar Nagaraj

    Hi Gwen,

    In certain scenarios for autolookup field to successfully parse the request, the reference field has to be present either in the root level of the form or in the same level where autolookup is present.

    Child field reference path should look like below :

    ${SubFormFieldInternalName_SubForm/SubFormFieldInternalName/ChildFieldInternalName}

    This path will be autoformed if you drag and drop the child field from "Data Model" into the manual query text area.

    0
    Comment actions Permalink
  • Avatar
    Gwen Wilson

    ok, yes, I'm thinking i need to get rid of the subform (move the fields onto the form directly). I tried dragging the field from the subform to the sql, and it validates, but no records are returned when the form is run.  

    i made a test field directly on the form (not in the subform) and this worked fine: 

    where (Segment2 = '${TestSegment}' or '${TestSegment}' = '-1')

    but when I reference the one in the subform, it won't return records

    where (Segment2 = '${CustSalesRel_SubForm/CustSalesRel/Segment}' or '${CustSalesRel_SubForm/CustSalesRel/Segment}' = '-1')

    Thanks!

     

    0
    Comment actions Permalink
  • Avatar
    Manoj Kumar Nagaraj

    Hi Gwen,

    Assuming that your AutoLookup control is at root level, there are two solutions

    1. Move the "Segment" field to the root level
    2. Move AutoLookup inside subform

    Making any of the above change will result in AutoLookup and Segment field to be in same level. Hence the AutoLookup will parse the request and bind the data.

    0
    Comment actions Permalink

Please sign in to leave a comment.