Text field appears with no reason bug.

Hi All,

in my application in a specific form there is a big bug: a field text that there is not in my code appears when I click on the page
in different places of the page or appears as soon as I land on the page, has this ever happened to you?

Thank you in advance
Vincenzo

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Please provide more information if available including

    1. screenshot(s) of the issue on your form,
    2. the SAIL code used on your form, at least as much of it as you can share, pasted into a "Code Box" (use functionality insert -> insert code)
  • Here there is a screenshot and the code:

    a!localVariables(
      local!affiliateGroupId:
        rule!ADA_getWOMGroupIdByAffiliate(affiliate: ri!project.affiliateName_fkey),
      local!pagingInfo: 
        a!pagingInfo(
          startIndex: 1,
          batchSize: 10,
          sort: a!sortInfo(
            field: "name",
            ascending: true
          )
        ),
      local!selectedWells:
        {
          append(ri!projectOffsetWells),
          append(ri!projectWells)
        },
      a!cardLayout(
        contents:
        {
          a!richTextDisplayField(
            value:
            a!richTextHeader(
              text: "Scenario & wells definition for the Execution phase",
              size: "SMALL"
            )
          ),
          a!boxLayout(
            label: "Scenario",
            contents:
              a!paragraphField(
                label: "Note about the scenario",
                instructions: "Total Characters: " & len(ri!projectScenario.note) & "/" & 4096,
                value: ri!projectScenario.note,
                saveinto: ri!projectScenario.note,
                refreshAfter: "KEYPRESS",
                height: "MEDIUM"
              ),
            isCollapsible: true,
            isInitiallyCollapsed: false,
            marginBelow: "STANDARD"
          ),
          a!boxLayout(
            label: "Offset wells",
            contents:
              {
                a!localVariables(
                  local!pickerCountry,
                  local!pickerAffiliate,
                  local!pickerField,
                  local!pickerWell,
                  {
                    richTextField(
                      label: "",
                      labelPosition: "COLLAPSED",
                      instructions: "Offset wells are those wells with characteristics to some extent similar to the wells to be drilled within the project. They do not have to belong to the same Affiliate or country of the project. ",
                      disabled: true,
                      validations: {},
                      height: "AUTO",
                      richTextValue: null,
                      richTextSaveInto: null,
                      readOnly: null,
                      maxSize: null,
                      placeholder: null,
                      enableProgressBar: null,
                      allowedFormats: null
                    ),
                    a!sideBySideLayout(
                      items: {
                        a!sideBySideItem(
                          item: a!pickerFieldCustom(
                            label: "Country",
                            labelPosition: "ABOVE",
                            instructions: "",
                            helptooltip: 
                               "If you don’t find the country inside the list, please contact " & 
                              cons!ADA_ERF_CONTACT,
                            placeholder: "Type country Code or Name",
                            maxSelections: 1,                    
                            suggestFunction: rule!ADA_suggestCountries(search: _),
                            selectedLabels: 
                              if(
                                not(rule!ADA_isEmpty(local!pickerCountry)),
                                  tostring(
                                    concat(
                                      index(local!pickerCountry,"code",null),
                                      " - ",
                                      index(local!pickerCountry,"name",null)
                                    )
                                  ),
                                  {}                        
                              ),                   
                            value: local!pickerCountry,
                            saveInto: {
                              local!pickerCountry,
                              a!save(local!pickerAffiliate,null),
                              a!save(local!pickerField,null),
                              a!save(local!pickerWell,null)
                            },                      
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: a!pickerFieldCustom(
                            label: "Affiliate",
                            labelPosition: "ABOVE",
                            placeholder: "Type affiliate",
                            maxSelections: 1,
                            suggestFunction: 
                              rule!ADA_suggestAffiliates(
                                country: index(local!pickerCountry,"code",null),
                                search: _
                              ),
                            selectedLabels: 
                              if(
                                not(rule!ADA_isEmpty(local!pickerAffiliate)),
                                index(local!pickerAffiliate,"name",null),
                                {}
                              ),
                            value: local!pickerAffiliate,
                            saveInto: {
                              local!pickerAffiliate,
                              a!save(local!pickerField,null),
                              a!save(local!pickerWell,null)
                            },
                            disabled: rule!ADA_isEmpty(local!pickerCountry),
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: a!pickerFieldCustom(
                            label: "Offset well field",
                            labelPosition: "ABOVE",
                            placeholder: "Type field",
                            maxSelections: 1,
                            suggestFunction: 
                              rule!ADA_suggestFields(
                                country: index(local!pickerCountry,"code",null), 
                                search: _
                              ),
                            selectedLabels:
                              if(
                                not(rule!ADA_isEmpty(local!pickerField)),
                                tostring(
                                  concat(
                                    index(local!pickerField,"code",null),
                                    " - ",
                                    index(local!pickerField,"name",null)
                                  )
                                ),
                                {}                        
                              ),
                            value: local!pickerField,
                            saveInto: {
                                local!pickerField,
                                a!save(local!pickerWell,null)
                            },
                            disabled: rule!ADA_isEmpty(local!pickerCountry),
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: a!pickerFieldCustom(
                            label: "Well",
                            labelPosition: "ABOVE",          
                            placeholder: "Type well Code or Name or Path",
                            maxSelections: 1,
                            suggestFunction:
                              rule!ADA_suggestWells(                  
                                countryCode: index(local!pickerCountry,"code",null),
                                affiliate: index(local!pickerAffiliate,"name",null),
                                fieldCode: index(local!pickerField,"code",null),
                                wells: 
                                  if(rule!ADA_isEmpty(local!selectedWells),
                                    {},
                                    local!selectedWells.code
                                  ),
                                excludeWells: true,
                                search: _
                              ),
                            selectedLabels:
                              if(rule!ADA_isEmpty(local!pickerWell),
                                {},
                                tostring(
                                  concat(
                                    trim(local!pickerWell.code),
                                    " - ",
                                    trim(local!pickerWell.name),
                                    " - ",
                                    rule!ADA_coalesce(value:local!pickerWell.fieldName),
                                    " - ",
                                    rule!ADA_coalesce(value:local!pickerWell.typeDescription)
                                  )
                                )
                              ),                        
                            value: local!pickerWell,
                            saveInto: local!pickerWell,  
                            disabled: false,
                            validations: {}
                          )
                        ),
                        a!sideBySideItem(
                          item: 
                            a!buttonArrayLayout(
                              buttons: {
                                a!buttonWidget(
                                  label: "Add",
                                  value: 
                                    if(
                                      rule!ADA_isEmpty(local!pickerWell),
                                      {},
                                      rule!ADA_mapCDBWellToProjectWell(                                    
                                        cdbWell: local!pickerWell,   
                                        projectWell:
                                          'type!{urn:com:appian:types:ADA}ADA_projectWell'(
                                            id: rule!ADA_calcWellsTemporaryId(ri!projectOffsetWells),
                                            scenarioId_fkey: ri!projectScenario.id,
                                            projectId_fkey: ri!project.id,
                                            offsetWell: true,
                                            createdOn: now(),
                                            createdBy: loggedInUser()
                                          )
                                      )
                                    ),
                                  saveInto: {
                                    a!save(
                                      ri!projectOffsetWells,
                                      append(
                                        ri!projectOffsetWells,
                                        save!value
                                      )
                                    ),
                                    a!save(
                                      local!selectedWells,
                                      append(
                                        local!selectedWells,
                                        save!value
                                      )
                                    ),
                                    a!save(
                                      local!pickerWell,
                                      null
                                    )
                                  },
                                  size: "SMALL",
                                  style: "PRIMARY",
                                  disabled: rule!ADA_isEmpty(local!pickerWell)
                                )
                              },
                              marginBelow: "NONE"
                            ),
                          width: "MINIMIZE"
                        )                    
                      },
                      spacing: "DENSE",
                      marginBelow: "STANDARD"                  
                    ),  
                    a!gridField(
                      label: "Read-only Grid",
                      labelPosition: "COLLAPSED",
                      emptyGridMessage: "No data available",
                      data: ri!projectOffsetWells,
                      columns: {
                        a!gridColumn(
                          label: "Name",
                          sortField: "name",
                          value: fv!row.name
                        ),
                        a!gridColumn(
                          label: "Well Code",
                          sortField: "code",
                          value: fv!row.code
                        ),
                        a!gridColumn(
                          label: "Path",
                          sortField: "typeDescription",
                          value: index(rule!ADA_getWellTypeByCode(fv!row.wellTypeCode_fkey),"description","")
                        ),
                        a!gridColumn(
                          label: "Affiliate",
                          sortField: "affiliateName_fkey",
                          value: fv!row.affiliateName_fkey
                        ),
                        a!gridColumn(
                          label: "Field",
                          sortField: "fieldName",
                          value: fv!row.fieldName
                        ),
                        a!gridColumn(
                          label: "Country",
                          sortField: "countryName",
                          value: index(rule!ADA_getCountryByCode(fv!row.countryCode_fkey),"name","")
                        ),
                        a!gridColumn(
                          value: 
                            a!richTextDisplayField(
                              value:
                                a!richTextIcon(
                                  icon: "TRASH",
                                  link:
                                    a!dynamicLink(
                                      saveInto: {
                                        a!save(
                                          ri!projectOffsetWells,
                                          remove(
                                            ri!projectOffsetWells,
                                            wherecontains(
                                              fv!row.id,
                                              ri!projectOffsetWells.id
                                            )
                                          )
                                        ),
                                        a!save(
                                          local!selectedWells,
                                          remove(
                                            local!selectedWells,
                                            wherecontains(
                                              fv!row.id,
                                              local!selectedWells.id
                                            )
                                          )
                                        )
                                      }
                                    ),
                                  linkStyle: "STANDALONE"
                                )
                            )
                        )
                      },
                      pagingSaveInto: local!pagingInfo,
                      selectable: false,
                      spacing: "DENSE"
                    )                    
                  }
                
                )
              },
            isCollapsible: true,
            isInitiallyCollapsed: false,
            marginBelow: "STANDARD"
          ),
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!boxLayout(
                    label: 
                      "Wells (Country: " &
                      rule!ADA_getCountryByCode(ri!project.countryCode_fkey).name &
                      " - Affiliate: " &
                      ri!project.affiliateName_fkey &
                      ")",
                    contents:
                    {
                      a!localVariables(
                        local!pickerWell,
                        {
                          a!sideBySideLayout(
                            items: {
                              a!sideBySideItem(
                                item: a!pickerFieldCustom(
                                  label: "Well*",
                                  labelPosition: "ABOVE",
                                  helptooltip: 
                                    "If you don’t find the well inside the list, please contact " & 
                                    cons!ADA_ERF_CONTACT,
                                  placeholder: "Type well Code or Name or Path",
                                  maxSelections: 1,
                                  suggestFunction:
                                    rule!ADA_suggestWells(                  
                                      countryCode: ri!project.countryCode_fkey,
                                      affiliate: ri!project.affiliateName_fkey,
                                      wells: 
                                        if(rule!ADA_isEmpty(local!selectedWells),
                                          {},
                                          local!selectedWells.code
                                        ),                                  
                                      excludeWells: true,
                                      search: _
                                    ),
                                  selectedLabels:
                                    if(rule!ADA_isEmpty(local!pickerWell),
                                      {},
                                      tostring(
                                        concat(
                                          trim(local!pickerWell.code),
                                          " - ",
                                          trim(local!pickerWell.name),
                                          " - ",
                                          rule!ADA_coalesce(value:local!pickerWell.fieldName),
                                          " - ",
                                          rule!ADA_coalesce(value:local!pickerWell.typeDescription)
                                        )
                                      )
                                    ),                        
                                  value: local!pickerWell,
                                  saveInto: local!pickerWell,
                                  required: false,
                                  requiredmessage: "You must insert a well to continue ",  
                                  validations: {}
                                )
                              ),
                              a!sideBySideItem(
                                item: 
                                a!buttonArrayLayout(
                                  buttons: {
                                    a!buttonWidget(
                                      label: "Add",
                                      value: 
                                        if(
                                          rule!ADA_isEmpty(local!pickerWell),
                                          {},
                                          rule!ADA_mapCDBWellToProjectWell(                                    
                                            cdbWell: local!pickerWell,   
                                            projectWell:
                                            'type!{urn:com:appian:types:ADA}ADA_projectWell'(
                                              id: rule!ADA_calcWellsTemporaryId(ri!projectWells),
                                              scenarioId_fkey: ri!projectScenario.id,
                                              projectId_fkey: ri!project.id,
                                              offsetWell: false,
                                              createdOn: now(),
                                              createdBy: loggedInUser()
                                            )
                                          )
                                        ),
                                      saveInto: {
                                        a!save(
                                          ri!projectWells,
                                          append(
                                            ri!projectWells,
                                            save!value
                                          )
                                        ),
                                        a!save(
                                          local!selectedWells,
                                          append(
                                            local!selectedWells,
                                            save!value
                                          )
                                        ),
                                        a!save(
                                          local!pickerWell,
                                          null
                                        )
                                      },
                                      size: "SMALL",
                                      style: "PRIMARY",
                                      disabled: rule!ADA_isEmpty(local!pickerWell)
                                    )
                                  },
                                  marginBelow: "NONE"
                                ),
                                width: "MINIMIZE"
                              )                    
                            },
                            spacing: "DENSE",
                            marginBelow: "STANDARD"                  
                          ),
                          a!gridField(
                            label: "Read-only Grid",
                            labelPosition: "COLLAPSED",
                            emptyGridMessage: "No data available",
                            data: ri!projectWells,
                            columns: {
                              a!gridColumn(
                                label: "Name",
                                sortField: "name",
                                value: fv!row.name
                              ),
                              a!gridColumn(
                                label: "Well Code",
                                sortField: "code",
                                value: fv!row.code
                              ),
                              a!gridColumn(
                                label: "Path",
                                sortField: "typeDescription",
                                value: index(rule!ADA_getWellTypeByCode(fv!row.wellTypeCode_fkey),"description","")
                              ),
                              a!gridColumn(
                                label: "Affiliate",
                                sortField: "affiliateName_fkey",
                                value: fv!row.affiliateName_fkey
                              ),
                              a!gridColumn(
                                label: "Field",
                                sortField: "fieldName",
                                value: fv!row.fieldName
                              ),
                              a!gridColumn(
                                label: "Country",
                                sortField: "countryName",
                                value: index(rule!ADA_getCountryByCode(fv!row.countryCode_fkey),"name","")
                              ),
                              a!gridColumn(
                                value: 
                                a!richTextDisplayField(
                                  value:
                                  a!richTextIcon(
                                    icon: "TRASH",
                                    link:
                                    a!dynamicLink(
                                      saveInto: {
                                        a!save(
                                          ri!projectWells,
                                          remove(
                                            ri!projectWells,
                                            wherecontains(
                                              fv!row.id,
                                              ri!projectWells.id
                                            )
                                          )
                                        ),
                                        a!save(
                                          local!selectedWells,
                                          remove(
                                            local!selectedWells,
                                            wherecontains(
                                              fv!row.id,
                                              local!selectedWells.id
                                            )
                                          )
                                        )
                                      }
                                    ),
                                    linkStyle: "STANDALONE"
                                  )
                                )
                              )
                            },
                            pagingSaveInto: local!pagingInfo,
                            selectable: false,
                            spacing: "DENSE"
                          )                    
                        }
    
                      )
                    },
                    isCollapsible: true,
                    isInitiallyCollapsed: false,
                    marginBelow: "STANDARD"
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!boxLayout(
                    label: "WOM Deputy",
                    contents: {
                      a!sideBySideLayout(
                        items: {
                          a!sideBySideItem(
                            item: 
                              a!pickerFieldCustom(
                                labelPosition: "ABOVE",
                                helptooltip: "WOM Deputy is an Engineer able to set-up selected wells without deliverable approval permissions.",
                                placeholder: "User",
                                maxSelections: 1,                    
                                suggestFunction: 
                                  rule!ADA_suggestUserByParentGroupId(
                                    parentGroupId: local!affiliateGroupId,
                                    search: _
                                  ),
                                selectedLabels: 
                                  if(
                                    not(rule!ADA_isEmpty(ri!project.deputyOwner)),
                                    with(
                                      local!user: rule!ADA_getUserByUserId(ri!project.deputyOwner),
                                      concat(local!user.firstName, " ", local!user.lastName)
                                    ),
                                    {}                        
                                  ),                   
                                value: ri!project.deputyOwner,
                                saveInto: ri!project.deputyOwner
                              )
                          )
                        },
                        spacing: "DENSE",
                        marginBelow: "STANDARD"                  
                      )
                    },
                    isCollapsible: true,
                    isInitiallyCollapsed: false,
                    marginBelow: "STANDARD",
                    accessibilitytext: ""
                  )
                },
                width: "NARROW"
              )
            }
          )
        },
        marginBelow: "NONE",
        showBorder: false
      )
    )

    TNX in advance

  • 0
    A Score Level 1
    in reply to vincenzol0001

    Line 53 richTextField, Is this any custom rich text component  ? Which Appian version are you on ?

  • 0
    A Score Level 1
    in reply to Shikha

    No, is a simple text, the version of Appian is 20.2...

  • 0
    Certified Lead Developer
    in reply to vincenzol0001

    I'm unclear what the issue is...

    What we're seeing in your screenshot is exactly what we'd expect to see with the code you posted:  you're using the Rich Text Editor plug-in to create a richTextField() item, with no pre-set value, along with the instruction text we can see.  What were you expecting to see instead?

  • I don't want the input text field down there...can you help me? :D 

  • 0
    Certified Lead Developer
    in reply to vincenzol0001

    Then why not just remove the richTextField() item?  I guess I still don't understand why you're using the Rich Text Input field when you don't want a Rich Text Input.  For starters, you can just comment out lines 53 - 67.

  • Yes ok, I want to insert a single line of text and what type of element can I insert?

  • 0
    Certified Lead Developer
    in reply to vincenzol0001

    As mentioned above, if you're just looking to create some simple read-only text (with optional formatting), you would just use a!richTextDisplayField().

Reply Children
No Data