Skip to main content
chriss4489
July 10, 2023
Question

Selection from Dropdown not showing on Summary view.

  • July 10, 2023
  • 5 replies
  • 0 views

When creating records for a Loans table, I have 6 dropdowns where the choices are fed via related tables. The dropdowns work fine, however, after the record is saved and viewing the summary view for that record, the selections in those dropdown fields are not showing, only getting a "-". The following is the code used in the display value portion for the summary view of the dropdown fields. This works fine on other tables I have done and is the same on the community Acme Auto app but I can't figure out what is missing.

a!defaultValue(
  if(
    isnull(
      ri!record['recordType!{6e4edeaf-030d-4fc2-917a-ab20f1027418}DC Loans.fields.{6c4213e9-38dd-4430-ac99-141cf70a9ebb}loanSourceId']
    ),
    "â`“",
    index(
      a!queryRecordType(
        recordType: 'recordType!{beec71c0-c52d-4b00-8311-cbcf34fcd0c7}DC LoanSources',
        fields: 'recordType!{beec71c0-c52d-4b00-8311-cbcf34fcd0c7}DC LoanSources.fields.{7413e7ce-3dc8-4513-bf9a-13a6376dfb11}loanSourceName',
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1),
        filters: a!queryFilter(
          field: 'recordType!{beec71c0-c52d-4b00-8311-cbcf34fcd0c7}DC LoanSources.fields.{ff748bfd-bb00-441d-a6b3-60434c5f439e}loanSourceId',
          operator: "=",
          value: ri!record['recordType!{6e4edeaf-030d-4fc2-917a-ab20f1027418}DC Loans.fields.{6c4213e9-38dd-4430-ac99-141cf70a9ebb}loanSourceId']
        )
      ).data,
      1,
      'recordType!{beec71c0-c52d-4b00-8311-cbcf34fcd0c7}DC LoanSources.fields.{7413e7ce-3dc8-4513-bf9a-13a6376dfb11}loanSourceName',
      null
    )
  ),
  "â`“"
)

    5 replies

    sarathkumr268295
    July 10, 2023

    Seems the if condition is being evaluated to true. Whatever variable you are using seems to be null. Thats why it shows only "-". Check the variables whether they are populated or not

    mikes0011
    Brainy
    July 10, 2023

    What is the value of ri!record?  Does it work in the Interface Editor, when populated with a valid value?

    chriss4489
    July 10, 2023

    The value for the record rule input is the loan record type itself. when opening up the data, all the dropdown fields show null instead of the child record ID. I replaced one with a child record id and the name showed up as it's supposed to. But I don't know why the are coming back as null? 

    mikes0011
    Brainy
    July 10, 2023

    I'm not clear what's going on here.  What value are you supplying "ri!record" with from the parent?  Can you post like a screenshot of the record type configuration where the dashboard rule is called?