Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

Default Values in Pane

The same way you connect a script to a list, you can also connect a procedure or script to these controls. The procedure/script should then return a default value when the selection pane is generated.

The following controls in Pane Designer can be connected to a default script:

  • List
  • Auto List
  • Text box
  • Date picker
  • Check box

A default procedure created in SQL Manager needs to be named p_pane_default_xxxx or a default script created in DB Studio needs to be named s_pane_default_xxxx in order to appear in the Default value(s) list (pictured above).

A data view can also be created and used to connect to a selection pane control.

Any parameters that the default procedure must receive will be visible under the Default value(s) drop-down. These parameters can be connected to another control in the selection pane.

This topic contains the following sections:

Return Values from Procedure/Script

The first column returned by the procedure/script is always used for default values, regardless of which control should be updated with default values. If the return set contains several columns, the first one is the only one that will be returned and the rest of the columns will be ignored.

  • List (drop-down) procedure: Can return 1 or several rows with values. For each row returned, Bizview checks if the values exist in the list box and will select those that exist in the list. If the list does not have a multi-select option, then the first value returned will be marked and all other rows will be ignored. If the list is dependent on another list, then the default values will be updated after the list has been updated.

  • Text box procedure: The first value returned by the procedure will be inserted in the text box. If the procedure returns several values, the other rows (except the first) will be ignored.

  • Check box procedure: Should return "true" or "false". If the procedure returns several rows, these will be ignored.

  • Date picker procedure: Should return a valid date, depending on the defined culture for the client. If clients within the same Bizview application have different cultures, these might be a little bit tricky. The date picker control will try to convert the received text to a valid date and if it fails, then the control will return blank. For sv-SE culture, the date returned should be 2012-01-01. Time can also be sent into the text string, however, it will not be shown in the control. If the procedure returns several rows, then these rows will be ignored.

Note: Date picker, Text box, and Check box controls also have the option to define a static default value by entering a text in the Text field property or marking a check box as "checked". However, if the default value needs to be dynamic in some way, then a procedure or script needs to be connected to the controls.

Parameters to the Procedure

When a procedure receives the parameters @client_id, @user_id, or @template_type, these will be exchanged with correct values when the selection pane is opened.

Three more parameters have been added, which a procedure can receive:

  • @template_id
  • @pane_id
  • @tag_id

By using these parameters, there is a possibility to write a common "default procedure", which depending on the parameters sent in, will perform a database search and return the correct values.

Published:

Default Values in Pane

The same way you connect a script to a list, you can also connect a procedure or script to these controls. The procedure/script should then return a default value when the selection pane is generated.

The following controls in Pane Designer can be connected to a default script:

  • List
  • Auto List
  • Text box
  • Date picker
  • Check box

A default procedure created in SQL Manager needs to be named p_pane_default_xxxx or a default script created in DB Studio needs to be named s_pane_default_xxxx in order to appear in the Default value(s) list (pictured above).

A data view can also be created and used to connect to a selection pane control.

Any parameters that the default procedure must receive will be visible under the Default value(s) drop-down. These parameters can be connected to another control in the selection pane.

This topic contains the following sections:

Return Values from Procedure/Script

The first column returned by the procedure/script is always used for default values, regardless of which control should be updated with default values. If the return set contains several columns, the first one is the only one that will be returned and the rest of the columns will be ignored.

  • List (drop-down) procedure: Can return 1 or several rows with values. For each row returned, Bizview checks if the values exist in the list box and will select those that exist in the list. If the list does not have a multi-select option, then the first value returned will be marked and all other rows will be ignored. If the list is dependent on another list, then the default values will be updated after the list has been updated.

  • Text box procedure: The first value returned by the procedure will be inserted in the text box. If the procedure returns several values, the other rows (except the first) will be ignored.

  • Check box procedure: Should return "true" or "false". If the procedure returns several rows, these will be ignored.

  • Date picker procedure: Should return a valid date, depending on the defined culture for the client. If clients within the same Bizview application have different cultures, these might be a little bit tricky. The date picker control will try to convert the received text to a valid date and if it fails, then the control will return blank. For sv-SE culture, the date returned should be 2012-01-01. Time can also be sent into the text string, however, it will not be shown in the control. If the procedure returns several rows, then these rows will be ignored.

Note: Date picker, Text box, and Check box controls also have the option to define a static default value by entering a text in the Text field property or marking a check box as "checked". However, if the default value needs to be dynamic in some way, then a procedure or script needs to be connected to the controls.

Parameters to the Procedure

When a procedure receives the parameters @client_id, @user_id, or @template_type, these will be exchanged with correct values when the selection pane is opened.

Three more parameters have been added, which a procedure can receive:

  • @template_id
  • @pane_id
  • @tag_id

By using these parameters, there is a possibility to write a common "default procedure", which depending on the parameters sent in, will perform a database search and return the correct values.

For an optimal Community experience, Please view on Desktop
Powered by Zendesk