Hi all,
An error occurred while executing a save: Expression evaluation error: Invalid index: Cannot index property 'medicalScientist' of type String into type List of Variant.
I got the above error for this code can any one help me out on this
a!localVariables( local!availableCollabsAmdsPagingInfo: a!pagingInfo( startIndex: 1, batchSize: cons!ISR_INT_BATCH_SIZE_EXTRA_LARGE ), local!selectedCollabsAmdsPagingInfo: a!pagingInfo( startIndex: 1, batchSize: cons!ISR_INT_BATCH_SIZE_EXTRA_LARGE ), local!userTimeZOne: rule!CMN_er_populateUserTimeZone(user: loggedInUser()), local!availableCollabsAmdsDataSubset: rule!ISR_er_FetchISRAndCollabsAmendmentsDataForIRCGRCMeeting( therapeuticAreaIds: ri!therapeuticAreaIds, pagingInfo: local!availableCollabsAmdsPagingInfo, researchType: cons!ISR_TXT_GRC_RESEARCH_TYPE_LIST ), local!collabsAmdSelection: ri!selectedCollabsAmds, local!collabsAmdSelectedRows: a!refreshVariable( value: ri!collabsAmdSelectedRows, refreshOnVarChange: ri!buttonActionMeetingTypeChange ), local!collabsAmdMedicalScientists, local!selectedCollabsAmdsDataSubset: a!dataSubset( startIndex: index(local!selectedCollabsAmdsPagingInfo, "startIndex", 1), batchSize: index(local!selectedCollabsAmdsPagingInfo, "batchSize", -1), sort: index(local!selectedCollabsAmdsPagingInfo, "sort", {}), totalCount: count(index(local!collabsAmdSelectedRows, "amdId", {})), data: local!collabsAmdSelectedRows, identifiers: index(local!collabsAmdSelectedRows, "amdId", {}) ), { /*Amendments*/ a!boxLayout( label: "Available Collaborative Amendments", contents: { a!gridField( label: "", emptyGridMessage: "No Collaborative Amendments Available", data: local!availableCollabsAmdsDataSubset, columns: { a!gridColumn( label: "Amendment Number", value: a!richTextDisplayField( value: a!richTextItem( text: fv!row.amendmentNumber, link: a!recordLink( recordType: cons!ISR_RECORD_GS_AMENDMENT, identifier: fv!row.amdId ), linkStyle: "STANDALONE" ) ), align: "START", width: "1X" ), a!gridColumn( label: "Amendment Reason", value: a!localVariables( local!Id, rule!CMN_c_CompressAndExpandTheParagraphText( savedLocalVariable: local!Id, identifier: fv!identifier, text: fv!row.amendmentReason ) ), align: "START", width: "2X" ), a!gridColumn( label: "Proposal Number", value: a!richTextDisplayField( value: a!richTextItem( text: fv!row.proposalNumber, link: a!recordLink( recordType: cons!ISR_RECORD_GS_APPLICATION, identifier: fv!row.proposalId ), linkStyle: "STANDALONE" ) ), align: "START", width: "2X" ), a!gridColumn( label: "Principal Investigator", value: a!richTextDisplayField( value: a!richTextItem( text: fv!row.primaryResearcher ) ), align: "START", width: "2X" ), a!gridColumn( label: "Study Title", value: a!localVariables( local!Id, rule!CMN_c_CompressAndExpandTheParagraphText( savedLocalVariable: local!Id, identifier: fv!identifier, text: fv!row.studyTitle, textCompressLength: cons!ISR_TEXT_COMPRESS_LENGTH ) ), align: "START", width: "2X" ), /*a!gridColumn(*/ /*label: "Currency Code",*/ /*value: a!richTextDisplayField(*/ /*value: a!richTextItem(text: fv!row.currencyCode)*/ /*),*/ /*align: "START"*/ /*width:"2X"*/ /**/ /*),*/ a!gridColumn( label: "Amendment Budget", value: a!richTextDisplayField( value: a!richTextItem( text: if(rule!APN_isBlank( fv!row.convertedIncrementalBudget), 0.00, fixed(index(fv!row, "ConvertedIncrementalBudget", ""), 2) )) ), helpTooltip: "Additional Requested Budget", align: "END" ), a!gridColumn( label: "Country", value: a!imageField( images: a!documentImage( document: rule!APN_getIsoCountryFlag(countryCode: fv!row.countryCode), caption: fv!row.countryName ) ), width: "1X", align: "CENTER" ), a!gridColumn( label: "Therapeutic Area", value: a!localVariables( local!Id, rule!CMN_c_CompressAndExpandTheParagraphText( savedLocalVariable: local!Id, identifier: fv!identifier, text: fv!row.therapeuticArea ) ), align: "START", width: "2X" ), a!gridColumn( label: "Medical Scientist / Project Champion", value: a!richTextDisplayField( value: a!richTextItem( text: rule!APN_displayUser(fv!row.medicalScientist) ), showWhen: not(rule!APN_isBlank(fv!row.medicalScientist)), ), align: "START", width: "2X" ), a!gridColumn( label: "Slides", value: a!imageField( images: a!documentImage( document: cons!ISR_ICON_PRESENTATION, altText: "Slide", caption: concat( "Click here to download", " ", document(fv!row.mastSlideDocId, "name") ), link: a!documentDownloadLink(document: fv!row.mastSlideDocId) ), align: "CENTER", showWhen: not( rule!APN_isBlank(fv!row.mastSlideDocId) ) ), align: "CENTER", width: "ICON_PLUS" ), a!gridColumn( label: "RC Slide uploaded on", value: a!richTextDisplayField( value: a!richTextItem( text: concat( rule!ISR_er_RFPconvertDateTIMEFormat( showTimeZone: false(), date: index( rule!ISR_qry_GetAmendmentStudyByCriteria(amdId: fv!row.amdId), "rcSlideUploadedOn", {} ) ), if( rule!APN_isBlank( index( rule!ISR_qry_GetAmendmentStudyByCriteria(amdId: fv!row.amdId), "rcSlideUploadedOn", {} ) ), {}, local!userTimeZOne ), ), style: "EMPHASIS", size: "STANDARD", ) ), align: "CENTER", width: "2X" ), }, pagingSaveInto: local!availableCollabsAmdsPagingInfo, selectable: true(), selectionStyle: "CHECKBOX", selectionValue: local!collabsAmdSelection, selectionSaveInto: { local!collabsAmdSelection, a!save(ri!selectedCollabsAmds, local!collabsAmdSelection), a!save( local!collabsAmdSelectedRows, append(local!collabsAmdSelectedRows, fv!selectedRows) ), a!save( local!collabsAmdSelectedRows, remove( local!collabsAmdSelectedRows, wherecontains( tointeger(index(fv!deselectedRows, "amdId", {})), tointeger( index(local!collabsAmdSelectedRows, "amdId", {}) ) ) ) ), /*a!save(*/ /*local!collabsAmdSelectedRows,*/ /*difference(*/ /*local!collabsAmdSelectedRows,*/ /*fv!deselectedRows*/ /*)*/ /*),*/ a!save(ri!collabsAmdSelectedRows,local!collabsAmdSelectedRows), /*Populating Medical Scientists*/ a!save( local!collabsAmdMedicalScientists, local!collabsAmdSelectedRows.medicalScientist ), a!save( ri!collabsAmdMedicalScientists, remove( local!collabsAmdMedicalScientists, wherecontains( null, touniformstring(local!collabsAmdMedicalScientists) ) ) ) }, spacing: "DENSE" ) }, style: cons!CMN_COLOR_GILEAD_RED, marginBelow: "STANDARD", showWhen: not( rule!APN_isBlank(ri!therapeuticAreaIds) ) ), a!richTextDisplayField( labelPosition: "COLLAPSED", value: { a!richTextIcon( icon: "refresh", caption: "Refresh Medical Scientist", link: a!dynamicLink( saveInto: { a!save( local!availableCollabsAmdsDataSubset, rule!ISR_er_FetchISRAndCollabsAmendmentsDataForIRCGRCMeeting( therapeuticAreaIds: ri!therapeuticAreaIds, pagingInfo: local!availableCollabsAmdsPagingInfo, researchType: cons!ISR_TXT_GRC_RESEARCH_TYPE_LIST ) ), a!save( local!collabsAmdSelectedRows, index( index( local!availableCollabsAmdsDataSubset, "data", {} ), wherecontains( tointeger(local!collabsAmdSelection), tointeger( index( index( local!availableCollabsAmdsDataSubset, "data", {} ), "amdId", {} ) ) ), {} ) ), a!save( local!collabsAmdMedicalScientists, local!collabsAmdSelectedRows.medicalScientist ), a!save( ri!collabsAmdMedicalScientists, remove( local!collabsAmdMedicalScientists, wherecontains( null, touniformstring(local!collabsAmdMedicalScientists) ) ) ) } ), size: "LARGE" ) }, align: "RIGHT", showWhen: not( rule!APN_isEmpty(local!collabsAmdSelectedRows) ) ), a!boxLayout( label: "Selected Collaborative Amendments", style: cons!CMN_COLOR_GILEAD_RED, marginBelow: "STANDARD", contents: { rule!ISR_g_SelectedAmds( data: local!selectedCollabsAmdsDataSubset, pagingInfo: local!selectedCollabsAmdsPagingInfo, isShowOnDashboard: false(), selectedAmdId: ri!selectedAmdId, amdPrimaryReviewer: ri!amdPrimaryReviewer, amdAdhocReviewer: ri!amdAdhocReviewer, showAmdHelpText: ri!showAmdHelpText, readOnly: False() ) }, showWhen: not( rule!APN_isBlank(local!collabsAmdSelectedRows) ) ) } )
Discussion posts and replies are publicly visible
Seems like you try to fetch the value of the field "medicalScientist" from a data structure which misses that field. Line 158 might be a candidate. The error message mentions that this happens during a save-operation. You might have been clicking some button and the actual error might be inside some nested component.
Yes I just checked It is working fine now.Thank you for the update