<?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>Reusable grid</title><link>https://community.appian.com/discussions/f/user-interface/25168/reusable-grid</link><description>Hi. 
 
 I am attempting to make a reusable grid using a passed ri! of type Any with a cdt type being passed into it. 
 Optionally I am thinking about passing in a list of column names so I can specify the order the grid displays columns in. 
 
 From there</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/98037?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 17:13:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eb09275c-8783-4b02-8559-a2d08cf2c2d8</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Ah interesting, I guess the result of a query isn&amp;#39;t truly a dictionary - it&amp;#39;s actually just a list of variant. In that case I agree with your suggestion - probably casting to the map is safest.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/98020?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 14:06:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:88415edf-63ae-4625-bf01-337b55a2268c</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;whereas, if i do the exact same query and same row, but cast the result as its type (or just as a!map), it works.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!keys(
  cast(
    typeof( &amp;#39;type!{urn:com:appian:types:APP}APP_Person&amp;#39;()  ),
    rule!APP_QRY_Person(personId: 87).data[1]
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!keys(
  cast(
    typeof( a!map() ),
    rule!APP_QRY_Person(personId: 87).data[1]
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/98015?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 13:52:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d656a18a-799e-49f2-a80c-cb0721d38b27</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="2478" url="~/discussions/f/user-interface/25168/reusable-grid/97997#97997"]The keys function should work on a dictionary. [/quote]
&lt;p&gt;I was able to reproduce Robert&amp;#39;s issue actually.&amp;nbsp; If I take a query entity which I already know to return a single known row, and wrap it in a!keys(), i get the pink error &amp;quot;The passed parameter(s) are of the wrong type. Received the type Any Type.&amp;quot;&amp;nbsp; I.e. from this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;a!keys(rule!APP_QRY_Person(personId: 87).data[1])&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1658238769615v1.png" alt=" " /&gt;&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97997?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 12:50:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c0c7fe3-1ec8-4d83-9fcf-423ab428cde1</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;The keys function should work on a dictionary. Is it possible that the data you provided is empty? The biggest issue I see with this paradigm is that it is entirely dependent on the data that is provided, so if for any reason there is no data, it won&amp;#39;t be possible to generate any columns either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97950?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 23:56:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:390bb50b-25a3-44c1-8616-1759f3187629</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I think my original suggestion was that you could add a type (or just type id) as a parameter of your reusable component, and call a!keys() on that type reference inside the component.&lt;/p&gt;
&lt;p&gt;For example if you pass a relevant type number (integer), into this code, you get the requested keys: a!keys(cast(6590, {}))&lt;/p&gt;
&lt;p&gt;(6590 is an arbitrary CDT type number in my system, sub out for one of yours, which you can discover with the &amp;quot;typeof&amp;quot; function)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97949?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 23:48:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fe9745b-08f9-40c6-9a4b-60d6f00960ff</guid><dc:creator>roberts0186</dc:creator><description>&lt;p&gt;Sorry. yes the a!keys function on a datasubset.&lt;/p&gt;
&lt;p&gt;Example is a!keys(value:ri!mydatasubset.data[1])&lt;/p&gt;
&lt;p&gt;value being of the format&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;span&gt;[isActive:true,modifiedBy:fin.financeadmin,createdOn:6/21/2021 3:19 PM GMT-05:00,createdBy:finley.financeadmin,purchaseOrderCategory:Haste,clientPoId:To,purchaseOrderId:105]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Returns error for the above line as &amp;quot;The passed parameter(s) are of the wrong type. Received the type Any Type&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97948?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 23:47:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:159203a6-9c6a-4538-920f-ebd01f2740d8</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="137368" url="~/discussions/f/user-interface/25168/reusable-grid/97947#97947"]map function doesn&amp;#39;t seem to work [/quote]
&lt;p&gt;What do you mean by &amp;quot;map function&amp;quot;?&amp;nbsp; Do you mean a!keys()?&amp;nbsp; Or are you trying to do something else?&amp;nbsp; Can you post a code snippet, and share what you were hoping for (versus what you&amp;#39;re achieving)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97947?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 23:43:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3792aa72-09a9-4f08-af5e-815be2472667</guid><dc:creator>roberts0186</dc:creator><description>&lt;p&gt;Do you happen to know how to use this with a datasubset?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I had thought i could just use the .data field, but apparently despite grabbing an individual dictionary(which documentation says works) from it, key function doesn&amp;#39;t seem to work on it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97702?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 19:19:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0a4e4199-07d5-48bd-ad19-54eff6c5dfb7</guid><dc:creator>roberts0186</dc:creator><description>&lt;p&gt;I was&amp;nbsp;brainstorming filter designs. Most of these are oriented around uncluttering filter usage without forcing the user to drill into hidden filters. When i say a filter I imagine something in the format below.&lt;/p&gt;
&lt;p&gt;[CreatedBy]:[____&lt;span style="text-decoration: underline;"&gt;enterTextHere__&lt;/span&gt;_______________]&lt;/p&gt;
&lt;p&gt;1. A filter that toggles the filtered field based on a set of autogenerated buttons in a line above your column names, named after the column names. See below&lt;/p&gt;
&lt;p&gt;[CreatedBy] [CreatedDate] [Serial]&lt;/p&gt;
&lt;p&gt;[______Enter text here_____________]&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; -I wasn&amp;#39;t a fan of how cluttered things get with a dozen _Enter text heres__ normal filters in mass.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;-Even with hiding them when not in use, I feel&amp;nbsp; they either take too long to drill into or too many are shown at once with larger queries.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;-Buttons would reduce this space usage and allow faster filter choosing and cleaner space. This could cover&amp;nbsp;about twice the number of column names in the space a normal filter uses.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp;- Design decision with this is only one thing is filtered on at a time.&lt;/p&gt;
&lt;p&gt;2. Most users probably only filter on a few columns.&amp;nbsp; A&amp;nbsp;way to let users choose their own configuration of normal filters might be useful.&amp;nbsp; Add on filters by giving them a multi selectable dropdown with column names to enable/disable.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; -I would like the dropdown autogenerated.&lt;/p&gt;
&lt;p&gt;Some features seem too complicated as I type them out like&amp;nbsp; letting a user create a preset that exists each time they log in. Plus I feel they would require creating tables for the info and would definitely stop the generic-ness of the rule I has wanted.&lt;/p&gt;
&lt;p&gt;Ex.&lt;/p&gt;
&lt;p&gt;(Kyle sets it up so he sees ID and FinishDate filters)&amp;nbsp; (Marie sets her preset to see filters for ID and CreatedBy)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anyway I think this is all a bit beside the point.&amp;nbsp; Came here looking for ways to extract column info from things like datasubsets to automate the above. Thats what I want tips on here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97639?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 05:50:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:919d4de7-6752-4403-afb5-7b3b5c8095ec</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I support Mike point of view. Creating a reusable component this close to the original will probably not help much.&lt;/p&gt;
&lt;p&gt;Over the years I developed quite a few reusable components. In case you are interested, I would be willing to support you. Which functionalities do you plan?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97633?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 20:36:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:46a44d4b-346b-4933-905f-21075f3378e7</guid><dc:creator>roberts0186</dc:creator><description>&lt;p&gt;There are other bits of functionality I want to add in that increase its worth if reusably programmed.&lt;/p&gt;
&lt;p&gt;Did not include them here was I wanted to keep the question simple.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97632?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 20:05:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:20b30319-9152-4b8f-ac97-59c4931077a5</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;FWIW, this sounds like a neat exercise but I don&amp;#39;t expect that this level of &amp;quot;reusable grid&amp;quot; will be worth the effort you put into it, in a production-usable sense.&amp;nbsp; The read-only grid component is already easy enough to configure that it can basically just be designed as-needed, or if you have a use case where you need a bunch of different interfaces to use a similar one, then you can set up a reusable one under that slightly-narrower scope.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reusable grid</title><link>https://community.appian.com/thread/97630?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 20:02:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:763d3434-d6b2-418e-8495-20d2ace01afe</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="137368" url="~/discussions/f/user-interface/25168/reusable-grid"]I don&amp;#39;t know if there is a way to get a list of all the fields&amp;nbsp;a&amp;nbsp;cdt type has.[/quote]
&lt;p&gt;a!keys()&amp;nbsp; --&amp;gt;&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1657656063133v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>