How to implement autosuggest feature for a!paragraphField

Hi team,

How to implement autosuggest feature for  a!paragraphField ,as we do not want to use the   a!pickerFieldCustom due to the small size of the text box.

Please suggest.

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Senior Developer
    in reply to bihitakd0002

    Sure here!

    a!localVariables(
      local!variable: null,
      local!data: a!refreshVariable(
        value: a!queryRecordType(
          recordType:"your RecordType here",
          fields: {
            "Fields you will need"
          },
          filters: a!queryLogicalExpression(
            operator: "AND",
            filters: {
              a!queryFilter(
                field: "Your labels/Values",
                operator: "includes",
                value: local!variable
              )
            },
            ignoreFiltersWithEmptyValues: true
          ),
          pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 100)
        ).data,
        refreshAlways:true
      ),
      local!selection,
      {
        a!columnsLayout(
          columns: {
            a!columnLayout(
              width: "MEDIUM",
              contents: a!sectionLayout(
                label: "On Selection",
                contents: {
                  a!textField(
                    label: "Search Text",
                    labelPosition: "ABOVE",
                    value: local!variable,
                    saveInto: {
                      local!variable,
                      a!save(local!selection, null)
                    },
                    refreshAfter: "KEYPRESS",
                    validations: {}
                  ),
                  a!forEach(
                    items: local!data,
                    expression: {
                      a!cardLayout(
                        showWhen: a!isNotNullOrEmpty(local!variable),
                        link: a!dynamicLink(
                          saveInto: a!save(local!selection, fv!item)
                        ),
                        style:if(
                          a!isNotNullOrEmpty(local!selection),
                          if(fv!item = local!selection, "ACCENT", ""),
                          {}
                        ),
                        contents: {
                          a!richTextDisplayField(
                            value: {
                              a!richTextItem(
                                text: fv!item["use your value index by record"]
                              )
                            }
                          )
                        }
                      )
                    }
                  )
                }
              )
            )
          }
        )
        
        
        
      }
    )