Conditional Grid Link

This is my data

Header - Item
A001 - A00101
A001 - A00102
A001 - A00103
A002 - A00201
A003 - A00301
A004 -
A005 - A00501
A005 - A00502

Please note that, A004 not yet contain any item.

Now, I created a grid -> link,

I would like to see the outcome in this format.
A001
A002
A003
A004
A005

This will make A001/2/3/5 to show the item. Hence A004 is not having any item, no link present.

Any comment on this issue?

Regards,
CK

Re: Conditional Grid Link

Create the link in code using sc_link() so you can evaluate Item value (onRecord event).

Regards,
Scott.

Re: Conditional Grid Link

Scott,

Any working example for reference?

Because ScriptCase Help can’t really provide more help / example. Or maybe I miss-out some example.

Regards,
CK

Re: Conditional Grid Link

Grid.onRecord Event:

if (!empty({item_field})) {
sc_link(header_field, form_edit.php, id_field={id_field},‘Click to Edit Field’, “_self”);
}

That should only link header fields where ‘item_field’ is not blank.

Regards,
Scott.

Re: Conditional Grid Link

Scott, I know you don’t lurk out here in the SC forum much anymore, but this really helped me :slight_smile:
Jamie