<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>disable a column in an editable interface</title><link>https://community.appian.com/discussions/f/user-interface/30615/disable-a-column-in-an-editable-interface</link><description>I want to disable a column for group of users in the editable grid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: disable a column in an editable interface</title><link>https://community.appian.com/thread/121716?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 07:18:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:04bb78ff-2bbc-4e8b-8038-6ec8b6679436</guid><dc:creator>vijayp6380</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable a column in an editable interface</title><link>https://community.appian.com/thread/121715?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 07:18:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f4596650-6a89-420d-8986-673a741cf5ae</guid><dc:creator>vijayp6380</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable a column in an editable interface</title><link>https://community.appian.com/thread/121714?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 06:41:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1669d36c-b6f9-4f2c-b9a8-5a8b7932ab45</guid><dc:creator>Manjunath B</dc:creator><description>&lt;p&gt;Use showWhen parameter in Grid header cell and in gridRowLayout&amp;#39;s contents, then add condition&amp;nbsp;&lt;span&gt;a!isUserMemberOfGroup( UserName, {Groups})&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;br /&gt; local!items: {&lt;br /&gt; { item: &amp;quot;Item 1&amp;quot;, qty: 1, unitPrice: 10 },&lt;br /&gt; { item: &amp;quot;Item 2&amp;quot;, qty: 2, unitPrice: 20 }&lt;br /&gt; },&lt;br /&gt; a!gridLayout(&lt;br /&gt; label: &amp;quot;Products&amp;quot;,&lt;br /&gt; instructions: &amp;quot;Update the item name, quantity, or unit price.&amp;quot;,&lt;br /&gt; headerCells: {&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Item&amp;quot;, showWhen:&lt;span&gt;a!isUserMemberOfGroup( UserName, {Groups})&lt;/span&gt;),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Qty&amp;quot;),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Unit Price&amp;quot;),&lt;br /&gt; a!gridLayoutHeaderCell(label: &amp;quot;Total&amp;quot;, align: &amp;quot;RIGHT&amp;quot;)&lt;br /&gt; },&lt;br /&gt; rows: {&lt;br /&gt; a!gridRowLayout(&lt;br /&gt; contents: {&lt;br /&gt; a!textField(&lt;br /&gt; value: local!items[1].item,&lt;br /&gt; saveInto: local!items[1].item,&lt;br /&gt; showWhen: a!isUserMemberOfGroup( UserName, {Groups})&lt;br /&gt; ),&lt;br /&gt; a!integerField(&lt;br /&gt; value: local!items[1].qty,&lt;br /&gt; saveInto: local!items[1].qty&lt;br /&gt; ),&lt;br /&gt; a!floatingPointField(&lt;br /&gt; value: local!items[1].unitPrice,&lt;br /&gt; saveInto: local!items[1].unitPrice&lt;br /&gt; ),&lt;br /&gt; a!textField(&lt;br /&gt; value: a!currency(&lt;br /&gt; isoCode: &amp;quot;USD&amp;quot;,&lt;br /&gt; value: tointeger(local!items[1].qty) * todecimal(local!items[1].unitPrice)&lt;br /&gt; ),&lt;br /&gt; readOnly: true,&lt;br /&gt; align: &amp;quot;RIGHT&amp;quot;&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;},&lt;br /&gt; rowHeader: 1&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: disable a column in an editable interface</title><link>https://community.appian.com/thread/121713?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 06:35:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c1e6fcc9-70e8-4a4c-9365-03f34b6e1a15</guid><dc:creator>Sri Ram Kaja</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/vijayp6380"&gt;vijayp6380&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;please check below code. In the first text box, I used isusermemberofgroup function.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  /*  
  * local!employess is provided in this recipe as a way to start with hard-coded
  * data. However, this data is identical to the data created from the entity-backed
  * tutorial. Replace the hard-coded data with a query to the employee data store
  * entity and all of the employee records from the tutorial will appear.
  *
  * To replace this data with your own, replace (ctrl+H or cmd+H) all references to
  * local!employees with your data source, either via rule input or local variable.
  */
  local!employees: {
    a!map( id: 1, firstName: &amp;quot;John&amp;quot; , lastName: &amp;quot;Smith&amp;quot; , department: &amp;quot;Engineering&amp;quot; , title: &amp;quot;Director&amp;quot; , phoneNumber: &amp;quot;555-123-4567&amp;quot; , startDate: today()-360 ),
    a!map( id: 2, firstName: &amp;quot;Michael&amp;quot; , lastName: &amp;quot;Johnson&amp;quot; , department: &amp;quot;Finance&amp;quot; , title: &amp;quot;Analyst&amp;quot; , phoneNumber: &amp;quot;555-987-6543&amp;quot; , startDate: today()-360 ),
    a!map( id: 3, firstName: &amp;quot;Mary&amp;quot;, lastName: &amp;quot;Reed&amp;quot; , department: &amp;quot;Engineering&amp;quot; , title: &amp;quot;Software Engineer&amp;quot; , phoneNumber: &amp;quot;555-456-0123&amp;quot; , startDate: today()-240 ),
  },
  a!formLayout(
    label: &amp;quot;Example: Add,Update, or Remove Employee Data&amp;quot;,
    contents: {
      a!gridLayout(
        totalCount: count(local!employees),
        headerCells: {
          a!gridLayoutHeaderCell(label: &amp;quot;First Name&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Last Name&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Department&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Title&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Phone Number&amp;quot; ),
          a!gridLayoutHeaderCell(label: &amp;quot;Start Date&amp;quot;, align: &amp;quot;RIGHT&amp;quot; ),
          /* For the &amp;quot;Remove&amp;quot; column */
          a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot; )
        },
        /* Only needed when some columns need to be narrow */
        columnConfigs: {
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
          a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:2 ),
          a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
        },
        /*
        * a!forEach() will take local!employee data and used that data to loop through an
        * expression that creates each row.
        *
        * When modifying the recipe to work with your data, you only need to change:
        * 1.) the number of fields in each row
        * 2.) the types of fields for each column (i.e. a!textField() for text data elements)
        * 3.) the fv!item elements. For example fv!item.firstName would change to fv!item.yourdata
        */
        rows: a!forEach(
          items: local!employees,
          expression: a!gridRowLayout(
            contents: {
              /* For the First Name Column*/
              a!textField(
                /* Labels are not visible in grid cells but are necessary to meet accessibility requirements */
                label: &amp;quot;first name &amp;quot; &amp;amp; fv!index,
                value: fv!item.firstName,
                saveInto: fv!item.firstName,
                required: true,
                disabled: if(
                  a!isUserMemberOfGroup(username: loggedInUser(),groups: cons!BA_GRP),
                  true,
                  false
                )
              ),
              /* For the Last Name Column*/
              a!textField(
                label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,
                value: fv!item.lastName,
                saveInto: fv!item.lastName,
                required:true
              ),
              /* For the Department Column*/
              a!dropdownField(
                label: &amp;quot;department &amp;quot; &amp;amp; fv!index,
                placeholder: &amp;quot;-- Select -- &amp;quot;,
                choiceLabels: { &amp;quot;Corporate&amp;quot;, &amp;quot;Engineering&amp;quot;, &amp;quot;Finance&amp;quot;, &amp;quot;Human Resources&amp;quot;, &amp;quot;Professional Services&amp;quot;, &amp;quot;Sales&amp;quot; },
                choiceValues: { &amp;quot;Corporate&amp;quot;, &amp;quot;Engineering&amp;quot;, &amp;quot;Finance&amp;quot;, &amp;quot;Human Resources&amp;quot;, &amp;quot;Professional Services&amp;quot;, &amp;quot;Sales&amp;quot; },
                value: fv!item.department,
                saveInto: fv!item.department,
                required:true
              ),
              /* For the Title Column*/
              a!textField(
                label: &amp;quot;title &amp;quot; &amp;amp; fv!index,
                value: fv!item.title,
                saveInto: fv!item.title,
                required:true
              ),
              /* For the Phone Number Column*/
              a!textField(
                label: &amp;quot;phone number &amp;quot; &amp;amp; fv!index,
                placeholder:&amp;quot;555-456-7890&amp;quot;,
                value: fv!item.phoneNumber,
                saveInto: fv!item.phoneNumber
              ),
              /* For the Start Date Column*/
              a!dateField(
                label: &amp;quot;start date &amp;quot; &amp;amp; fv!index,
                value: fv!item.startDate,
                saveInto: fv!item.startDate,
                required:true,
                align: &amp;quot;RIGHT&amp;quot;
              ),
              /* For the Removal Column*/
              a!richTextDisplayField(
                value: a!richTextIcon(
                  icon: &amp;quot;close&amp;quot;,
                  altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                  caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.firstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.lastName,
                  link: a!dynamicLink(
                    value: fv!index,
                    saveInto: {
                      a!save(local!employees, remove(local!employees, save!value))
                    }
                  ),
                  linkStyle: &amp;quot;STANDALONE&amp;quot;,
                  color: &amp;quot;NEGATIVE&amp;quot;
                )
              )
            },
            id: fv!index
          )
        ),
        addRowlink: a!dynamicLink(
          label: &amp;quot;Add Employee&amp;quot;,
          /*
           * For your use case, set the value to a blank instance of your CDT using
           * the type constructor, e.g. type!Employee(). Only specify the field
           * if you want to give it a default value e.g. startDate: today()+1.
           */
          value: {
            startDate: today() + 1
          },
          saveInto: {
            a!save(local!employees, append(local!employees, save!value))
          }
        ),
        rowHeader: 1
      )
    },
    buttons: a!buttonLayout(
      primaryButtons: a!buttonWidget(
        label: &amp;quot;Submit&amp;quot;,
        submit: true
      )
    )
  )
)
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>