Hello community, I am working with a portal in power apps.
I am trying to filter the list shown to the right, based on the text entered in the "Title" field of my form. In a certain way I want to filter the "Keywords" list by what is entered in the "Title" field.
This is the javascript that I have implemented
function onPrimaryChange(){
// get id of selected primary field
// this will work only if you render primary field as dropdown
let primaryValue = $("#title").val();
var list = $(".entity-grid");
if(primaryValue != null && primaryValue !=""){
console.log("titulo:" + primaryValue);
list.find("table tbody > tr").each(function () {
var tr = $(this);
//var adminOnly = $(tr).find('td[data-attribute="title"]').attr("aria-label");
var adminOnly = $(tr).find('td[data-attribute="title"]').attr("data-value");
//console.log("prueba1: " + adminOnly);
if (!adminOnly.includes(primaryValue)){
tr.hide();
list.show();
}
else
{
tr.show();
list.hide();
}
});
}else if(primaryValue == null || primaryValue =="")
{
list.hide();
}
}
Any ideas?
@OliverRodrigues
Can someone help me here?
Thanks cheers.