This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Revisiting the Display of a Relational Field. I only want to show the values that are in the field.

I have an aux table with 30 values. The values are Install Environments for a release process. 

I have a multi-relational field that I connect to the Aux table. 

The user selects the values they require on their update form. 

At a later point they may choose to install those values that were selected 

I can turn off the values that are available to them using the javascript shown below.  The display shows the entire aux table values but the javascript will hide the check boxes that are not in the multirelational array. 

It's a nice little bit of javascript.

What I would really like it to do is to entirely hide the field value and not just its checkbox. Similar to how the field displays on the State form. It only shows the values that are selected. 

Any ideas? 


if (GetFieldWidgetByName) {
var x = $(GetFieldWidgetByName("AVAILABLE_LOWER_ENVIRONMEN")).find(":checkbox(':checked')");

var lengthvar = x.length;
for (i = 0; i < x.length; i++)

var y = x[i].checked;
var z = x[i].value;
if ( y == true )
{
$("[value='"+ x[i].value +"']").attr("checked",false); // Makes sure the field is unchecked for available items.
}
else
{
$("[value='"+ x[i].value +"']").hide(); //Makes the checked items read only. 
}
}

This is the transition form outuput. It's showing all of the aux table values. 




This is the State form Output. I would like the state form output with checkboxes Only shows the selected items. 

Parents
  • Suggested Answer

    0  

    Hi. I think I would suggest using a Relational Grid control for both the original selection and the refinement. When the user first selects the values, the grid would be configured to show all available values (essentially, use a listing report that reports all valid values, Show only selected items=no, Display 'Show only selected items' checkbox=(your choice). When the user edits the same multi-relational field again on the 2nd transition, the grid could be configured to still show all available values (essentially, use a listing report that reports all valid values, but Show only selected items=yes, Display 'Show only selected items' checkbox=never.

    If you needed something more advanced, you could potentially create a runtime report instead of using a report definition in Composer to support the grid. You could even make that report an advanced SQL report if you needed to do even more advanced filtering (such as relating values between two multi-relational fields.).

Reply
  • Suggested Answer

    0  

    Hi. I think I would suggest using a Relational Grid control for both the original selection and the refinement. When the user first selects the values, the grid would be configured to show all available values (essentially, use a listing report that reports all valid values, Show only selected items=no, Display 'Show only selected items' checkbox=(your choice). When the user edits the same multi-relational field again on the 2nd transition, the grid could be configured to still show all available values (essentially, use a listing report that reports all valid values, but Show only selected items=yes, Display 'Show only selected items' checkbox=never.

    If you needed something more advanced, you could potentially create a runtime report instead of using a report definition in Composer to support the grid. You could even make that report an advanced SQL report if you needed to do even more advanced filtering (such as relating values between two multi-relational fields.).

Children
No Data