New macro: sc_field_init_off

The latest release (v6.0.025) includes a new macro: sc_field_init_off
“onApplicationInit events, in order to inhibit the fields of consultation on the initial load.”

There isn’t any documentation on how to use this macro!

I think the changelog means:
can be used in onApplicationInit events (scope ???)
used to exclude specified fields from the select query??
or
specified fields included in the form select query but rendered “hidden”??
or
… ???

If you could provide some clarification / documentation that would be great. Thanks.

Re: New macro: sc_field_init_off

Hello Andy,

I will see to it why our documentation wasn’t updated.

regards,
Bernhard Bernsmann

Re: New macro: sc_field_init_off

This macro is intended to inhibit the query fields on the initial load.

Fields inhibited by this macro can be enabled by using the “Columns” button.

Ex 01:

sc_field_init_off ({orderID}, {TotalValue});

PS: Documentation available on release 6.026.

Re: New macro: sc_field_init_off

Is there a ScriptCase macro to re-enable them via javascript or AJAX?

Presumably, the purpose of this macro is to load the value of a field but not display it with a view to subsequently displaying the field following user interaction?
How do you envisage it working?

Re: New macro: sc_field_init_off

Hello Andy,

The documentation is out. Please clear your browser cache, and access our documentation again.

regards,
Bernhard Bernsmann

Re: New macro: sc_field_init_off

Hi Bernhard
Thanks for your reply, but I still don’t get it.
What do you mean by “inhibit the query fields”?
Can you provide a real life example of how you would use this?
Thanks!


sc_field_init_off(Field1, Field2,…)

This macro is intended to inhibit the query fields on the initial load.

Fields inhibited by this macro can be enabled by using the “Columns” button.

Ex 01:

sc_field_init_off ({orderID}, {TotalValue});

Macro Scope
Grid application
onApplicationInit


Re: New macro: sc_field_init_off

I did a little test and as far as I can see you use it on grid applications in the onApplicationInit event and it will prevent the specified field(s) from being displayed in the grid.
You can then use :

sc_field_display({myfield}, on);

to display the field again (e.g. create a php button and add this to it).

Hope this helps

Re: New macro: sc_field_init_off

Hello,

The documentation is out: http://downloads.scriptcase.com.br/downloads/v6/manual/en_us/webhelp/manual_mp/28-Macros/00-macros_sc.htm#sc_field_init_off

regards,
Bernhard Bernsmann