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 ) ), "–" )
Discussion posts and replies are publicly visible
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