Skip to main content
May 8, 2024
Solved

Dialog Box

  • May 8, 2024
  • 4 replies
  • 0 views

Hi Expert

I have an interface where I have read only grid .

Now, when the user clicks on completed Status , I want a way to open the interface as a dialog.  if there is a way please let me know.

I tried with record action but not able to achieve this .

a!gridColumn(
          label: "Status",
          sortField: 'recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status',
          value: a!richTextDisplayField(
            value: a!richTextItem(
              text: if(
                a!isNullOrEmpty(
                  fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
                ),
                "",
                fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
              ),
              link: if(
                and(fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'] = cons!CDM2_VAL_TARGET_STATUS[2],fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{searchBy}searchBy']<>cons!CDM2_SEARCH_BY_OPTIONS[5]),
                a!safeLink(
                  label: "",
                  uri: rule!CDM2_ER_getAllInOneReportLink() & fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{id}id'] & "?repType=all",
                  openLinkIn: "NEW_TAB"
                ),
               
               a!dynamicLink(
                 label:"",
                 value:
                a!recordActionField(
                  actions:a!recordActionItem(
                    action:'recordType!{6d7edf3a-4632-432d-bae9-5e7daf0df4e8}Target_Record.actions.{0e6b7746-0abf-4994-9c04-00ab7d18eafd}ReportLink',
                    identifier:fv!row['recordType!{6d7edf3a-4632-432d-bae9-5e7daf0df4e8}Target_Record.fields.{id}id']
                  )
                ))
              
              ),
              color: if(
                searchb(
                  "Error",
                  fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status']
                ) <> 0,
                "NEGATIVE",
                {
                  a!match(
                    value: fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'],
                    equals: cons!CDM2_VAL_TARGET_STATUS[2],
                    then: "POSITIVE",
                    equals: cons!CDM2_VAL_TARGET_STATUS[4],
                    then: "#434343",
                    equals: cons!CDM2_VAL_TARGET_STATUS[3],
                    then: "#434343",
                    default: if(
                      fv!row['recordType!{1b81b174-97c1-47ee-aa85-b20723b749c3}CDM2_Target Record.fields.{status}status'],
                      "",
                      "#FFBF00",

                    ),

                  )
                }
              )
            )
          ),
          align: "CENTER"
        ),

Thanks

    Best answer by navinkumars960848

    You can make use of a!recordActionField in the a!gridcolumn under value parameter. The display parameter in the a!recordActionField allows you choose between dialog, same tab, new tab.

    4 replies

    mikes0011
    Brainy
    May 8, 2024

    [mention:a11f77a729fb4db2af76b09948583328:e9ed411860ed4f2ba0265705b8793d05] has a recipe on his blog Appian Rocks, for a built-in "fake easy popup" which should satisfy a lot of use cases.

    I'm curious though why the Record Action approach won't work for you?  FWIW your code looks wrong at first glance, the Record Action Field does not go in the value of a Dynamic Link, it is a field by itself which you would call separately from other components.

    May 8, 2024

    You can make use of a!recordActionField in the a!gridcolumn under value parameter. The display parameter in the a!recordActionField allows you choose between dialog, same tab, new tab.

    konduruc733182
    May 8, 2024

    Have you tried this? Configure this record action to open in a dialog box with the desired size in the records actions configuration.

    a!gridColumn(
            value: if(
              fv!row.status="Completed",
              a!recordActionField(
                actions: a!recordActionItem(
                  action: actionHere,
                  identifier: identifierHere
                ),
                style: "LINKS"
              ),
              a!richTextDisplayField(
                value: a!richTextItem(
                  text: fv!row.status,
                  color: "SECONDARY"
                )
              )
            )
          )

    May 9, 2024

    Thanks [mention:2df2892a4df7486f9775b4d2f0e405fd:e9ed411860ed4f2ba0265705b8793d05] it is working fine.