Hide field in Grid

Hello,
How can i hide a field content in grid.
It’s possible with form but in grid, it depends of row. Is it possible ?

Thanks
Guy G.
v9.6.006

Create a new field and put the assign the value you want to show

if (condition == true) {
   {newfield} = '';
} else {
   {newfield} = {originalfield};
}

in field configuration move {originalfield} to field not shown and put {newfield} at the position you want

1 Like

my field is a link, i want to hide this link with certain condition.

No problem it will work, define the new field as a link

my field is a image link define by sc. Works fine. just want to hide with some condition

Hide the image, the link or both

i already test with {my_field}=""; it keeps the link

Can you do a screen capture and point to what you want to hide, because I am hiding link and picture in some app without problem

this one in a grid
image
my code :
if ({sp.date_fin} < date(“Y-m-d H:i:s”)){
{download} = “”;
}
copie of my field declaration

Try that

Create a new integer field name linenumber

onNavigate event

{linenumber} = 0;

onRecord event

{linenumber} += 1;
if ({sp.date_fin} < date(“Y-m-d H:i:s”)) {

?>
<script>
   $(document).ready(function() {
		$('#id_sc_field_download_{linenumber}').hide();
   });
</script>
<?php

} else {
	
?>
<script>
   $(document).ready(function() {
		$('#id_sc_field_download_{linenumber}').show();
   });
</script>
<?php
	
}
1 Like

ok works great.

It’s a shame to do this code just for a simple change.

Many many thanks for this solution

Guy