We have a richtextfield as an input and saving the generated (html) text in the db,
basically we want to show the styled text inside a grid but when we tried it, this error was encounteredInterface Definition: Expression evaluation error at function a!gridLayout [line 13]: A grid layout component [label=“”] has an invalid value for “rows”. The row layout at index 1 contains a component that is not supported in the grid layout. Received CertifiedSAILExtension
is there any workaround for this?
Help would be much appreciatedThanks!
Discussion posts and replies are publicly visible
What version are you running? I believe richText is only supported on the most recent gridLayout, introduced in 19.2.
You're thinking of gridField (paging grid), which only just introduced rich text support in 19.2. However, gridLayout (editable grid) has supported rich text for quite a while now.
Hi Mike Schmit,
I got an error similar to the above error and error message is
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'bgh_uigridlayoutpaging' at function a!gridLayout [line 48]: A grid layout component [label=“”] has an invalid value for “rows”. The row layout at index 1 contains a component that is not supported in the grid layout. Received IconWidget
with( /*use the batch size unless you're on a not full last page*/ numItemsOnThisPage: rule!BGH_getNumItemsOnPage( pagingInfo: ri!pagingInfo, totalCount: ri!totalCount ), { if( /*invalid total count*/ or( ( ri!pagingInfo.startIndex - 1 + local!numItemsOnThisPage ) > ri!totalCount, and( not( ri!totalCount = 0 ), ri!totalCount < ri!pagingInfo.startIndex ) ), a!textField( readOnly: true, value: "A grid component [label=“" & ri!label & "”] has an invalid value for “totalCount”. “totalCount” must not be null, less than “startIndex” or less than “startIndex” - 1 + the number of items on the page, but “totalCount” was " & if( isnull( ri!totalCount ), "null", ri!totalCount ) & ", “startIndex” was " & ri!pagingInfo.startIndex & ", and there are " & local!numItemsOnThisPage & " items on the page." ), /*invalid batch size*/ or( ri!pagingInfo.batchSize <- 1, ri!pagingInfo.batchSize = 0 ), a!textField( readOnly: true, value: "A grid component [label=“" & ri!label & "”] has an invalid value for “pagingInfo”. “batchSize” must not be null, 0, or less than -1, but was " & if( isnull( ri!pagingInfo.batchSize ), "null", ri!pagingInfo.batchSize ) & "." ), /*no errors*/ { a!gridLayout( label: ri!label, instructions: ri!instructions, headerCells: ri!headerCells, columnConfigs: ri!columnConfigs, /*apply the given row rule, pass in the current indices of the page*/ rows: if( ri!totalCount = 0, {}, a!applyComponents( function: ri!rowPartialRule_rule, array: ri!pagingInfo.startIndex + enumerate( local!numItemsOnThisPage ) ) ), validations: ri!validations, validationGroup: ri!validationGroup, selectable: ri!selectable, selectionDisabled: ri!selectionDisabled, selectionRequired: ri!selectionRequired, selectionValue: ri!selectionValue, selectionSaveInto: ri!selectionSaveInto, addRowLink: ri!addRowLink, totalCount: "", emptyGridMessage: ri!emptyGridMessage, helpTooltip: ri!helpTooltip ), if( ri!totalCount > 0, a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: if( isnull( ri!pagingInfo ), "", a!richTextItem_18r1( text: { a!richTextItem_18r1( text: "<< First", link: if( ri!pagingInfo.startIndex = 1, null, a!dynamicLink( saveInto: a!save( ri!pagingInfo.startIndex, 1 ) ) ) ), a!richTextItem_18r1( text: " < Previous", link: if( ri!pagingInfo.startIndex = 1, null, a!dynamicLink( saveInto: a!save( ri!pagingInfo.startIndex, ri!pagingInfo.startIndex - ri!pagingInfo.batchSize ) ) ) ), a!richTextItem_18r1( text: " " & ri!pagingInfo.startIndex & "-" & ri!pagingInfo.startIndex + local!numItemsOnThisPage - 1 & " of " & ri!totalCount & " " ), a!richTextItem_18r1( text: "Next >", link: if( or( ri!pagingInfo.batchSize =- 1, ( ri!pagingInfo.startIndex + ri!pagingInfo.batchSize ) > ri!totalCount ), null, a!dynamicLink( saveInto: a!save( ri!pagingInfo.startIndex, ri!pagingInfo.startIndex + ri!pagingInfo.batchSize ) ) ) ), a!richTextItem_18r1( text: " Last >>", link: if( or( ri!pagingInfo.batchSize =- 1, ( ri!pagingInfo.startIndex + ri!pagingInfo.batchSize ) > ri!totalCount ), null, a!dynamicLink( saveInto: a!save( ri!pagingInfo.startIndex, 1 + rounddown( /*subtract one for the case where the last page is full*/ ( ri!totalCount - 1 ) / ri!pagingInfo.batchSize, 0 ) * ri!pagingInfo.batchSize ) ) ) ) } ) ) ), {} ) } ) })
Could you do me a favor and edit this reply to use the Code feature (Insert -> Insert Code) and re-paste your code there so that it retains formatting/indentation? It's very hard to read code that's been pasted with no indentation as above, though i'm trying.
Tq for ur response Mike
But I got the answer...
Glad you figured it out - what did the solution end up being?