{"id":670,"date":"2026-04-30T09:53:19","date_gmt":"2026-04-30T12:53:19","guid":{"rendered":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/?p=670"},"modified":"2026-04-30T09:53:19","modified_gmt":"2026-04-30T12:53:19","slug":"filtro-case-insensitive-en-permisos-gam-genexus","status":"publish","type":"post","link":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/?p=670","title":{"rendered":"Filtro Case-Insensitive en Permisos GAM (GeneXus)"},"content":{"rendered":"<h1 data-pm-slice=\"1 1 []\">\ud83d\udcc4 Filtro Case-Insensitive en Permisos GAM (GeneXus)<\/h1>\n<h2>\ud83d\udd39 Contexto<\/h2>\n<p>En el Web Panel de administraci\u00f3n de permisos (GAM), se requiere filtrar los permisos por nombre desde la grilla.<\/p>\n<p>Por defecto, el m\u00e9todo:<\/p>\n<pre><code>&amp;GAMRole.GetPermissions(&amp;RolePermissionFilter, &amp;Errors)<\/code><\/pre>\n<p>utiliza:<\/p>\n<pre><code>&amp;RolePermissionFilter.Name<\/code><\/pre>\n<p>Este filtro es <strong>case-sensitive<\/strong>, es decir:<\/p>\n<ul data-spread=\"false\">\n<li>\n<p>&#8220;Del&#8221; encuentra &#8220;Delete&#8221; \u2705<\/p>\n<\/li>\n<li>\n<p>&#8220;del&#8221; NO encuentra &#8220;Delete&#8221; \u274c<\/p>\n<\/li>\n<\/ul>\n<div>\n<hr \/>\n<\/div>\n<h2>\ud83d\udd39 Problema<\/h2>\n<p>El filtrado por nombre utilizando:<\/p>\n<pre><code>&amp;RolePermissionFilter.Name = \"%\" + &amp;FilName.Trim() + \"%\"<\/code><\/pre>\n<p>depende del motor interno de GAM, el cual <strong>distingue may\u00fasculas\/min\u00fasculas<\/strong>, generando resultados inconsistentes para el usuario.<\/p>\n<div>\n<hr \/>\n<\/div>\n<h2>\ud83d\udd39 Soluci\u00f3n implementada<\/h2>\n<h3>1. Deshabilitar filtro por nombre en GAM<\/h3>\n<p>Se evita el uso del filtro case-sensitive asignando:<\/p>\n<pre><code>&amp;RolePermissionFilter.Name = \"\"<\/code><\/pre>\n<p>De esta forma:<\/p>\n<ul data-spread=\"false\">\n<li>\n<p>GAM devuelve todos los permisos seg\u00fan los dem\u00e1s filtros<\/p>\n<\/li>\n<li>\n<p>Se delega el filtrado por nombre a la l\u00f3gica de la aplicaci\u00f3n<\/p>\n<\/li>\n<\/ul>\n<div>\n<hr \/>\n<\/div>\n<h3>2. Aplicar filtro manual case-insensitive<\/h3>\n<p>Dentro del <code>For<\/code>, se implementa un filtro utilizando <code>Upper()<\/code> y <code>like<\/code>:<\/p>\n<pre><code>For &amp;Permission in &amp;Permissions\r\n\r\n    if &amp;FilName.IsEmpty() or\r\n       Upper(&amp;Permission.Name) like \"%\" + Upper(&amp;FilName.Trim()) + \"%\"\r\n\r\n        \/\/ carga de datos en la grilla\r\n        Grid.Load()\r\n        \r\n    endif\r\n\r\nEndFor<\/code><\/pre>\n<div>\n<hr \/>\n<\/div>\n<h2>\ud83d\udd39 Funcionamiento<\/h2>\n<p>El filtro transforma ambos valores a may\u00fasculas:<\/p>\n<pre><code>Upper(&amp;Permission.Name)\r\nUpper(&amp;FilName)<\/code><\/pre>\n<p>Esto permite comparar.<\/p>\n<h3>\u2714 Ejemplos<\/h3>\n<table>\n<tbody>\n<tr>\n<th>Input usuario<\/th>\n<th>Permiso<\/th>\n<th>Resultado<\/th>\n<\/tr>\n<tr>\n<td>del<\/td>\n<td>Delete<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>DEL<\/td>\n<td>Delete<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>Del<\/td>\n<td>Delete<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div>\n<hr \/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udcc4 Filtro Case-Insensitive en Permisos GAM (GeneXus) \ud83d\udd39 Contexto En el Web Panel de administraci\u00f3n de permisos (GAM), se requiere filtrar los permisos por nombre desde la grilla. Por defecto, el m\u00e9todo: &amp;GAMRole.GetPermissions(&amp;RolePermissionFilter, &amp;Errors) utiliza: &amp;RolePermissionFilter.Name Este filtro es case-sensitive, es decir: &#8220;Del&#8221; encuentra &#8220;Delete&#8221; \u2705 &#8220;del&#8221; NO encuentra &#8220;Delete&#8221; \u274c \ud83d\udd39 Problema El filtrado [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-670","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gx"],"_links":{"self":[{"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/posts\/670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=670"}],"version-history":[{"count":0,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/posts\/670\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=\/wp\/v2\/media\/671"}],"wp:attachment":[{"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.gobiernoriocuarto.gob.ar\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}