Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Data Entry Preview Exclusive

getWidgetByName

MethodgetWidgetByName(name)Get the widget in the data entry cell by the widget name
  Parametername: string

widget name, string

Note: The widget in the cell has no name by default, you can add it at "Widget Name".

Return valueobject 

Thewidget object, which needs to be used in combination with the attributes/methods of the widget. When the cell is expanded, it returns the first widget in the found widget array.

   Example

Example 1: If the obtained report object is defined as report, get the drop-down box widget comboBox0 in the cell

report.getWidgetByName("comboBox0");

Example 2: In a general report, get the drop-down box widget comboBox0 in the cell

_g().getWidgetByName("comboBox0");

Application

example

When entering data in the report, the grade is only allowed to be entered once, and after entering the value in the grade widget, it is set as disabled:

Click to download the template:

Set to disabled after the widget has entered a value.cpt

1.gif

MobileSupport mobile terminal

getWidgetByCell

MethodgetWidgetByCell(cell)Get the widget in the data entry cell through the cell address
  Parametercell:stringcell address, string
Return valueobject The widget object needs to be used in combination with the attributes/methods of the widget. When the cell is expanded, only one widget is returned, and the cell corresponds to the number of the expanded cell.
   Example

Example 1: If the obtained report object is defined as report , obtain the drop-down box widget in cell A1 of the report

report.getWidgetByCell("A1");

Example 2: In data entry report, get the drop-down box widget in cell A1

_g().getWidgetByCell("A1");

Application

example

When entering data in the report, the grade is only allowed to be entered once. After getting the input value of the widget in cell B4, set it to disabled:

Click to download the template:

Set to disabled after the widget has entered a value(obtain by cell address).cpt

2.gif

MobileSupport mobile terminal

getWidgetsByName

MethodgetWidgetsByName(name)

Get the widget with the same name in the data entry cell by the widget name

  Parametername: string

widget name, string

Note: The widget in the cell has no name by default, you can add it at "Widget Name".

Return value[object ]

Array of widget objects, which needs to be used in combination with the attributes/methods of the widget; when the cell is expanded, it returns an array of widget objects

   Example

Example 1: If the obtained report is defined as report, get all the drop-down box widgets named comboBox0 in the cell

report.getWidgetsByName("comboBox0");

Example 2: In a general report, get all the drop-down box widgets named comboBox0 in the cell

_g().getWidgetsByName("comboBox0");

Application

example

When entering data in the report, click the button to get all the values of the radio button group widgets extension:

For detailed implementation methods, please refer to:JS Get all values of extended widget

3.gif

MobileSupport mobile terminal

appendReportRC

MethodappendReportRC(num,cell)Insert a row at a specific position, the specified cell needs to set the extended attribute
  Parameter

num:number

cell:string

num:number of rows inserted, number

cell:The cell number of the insertion position. If there is no such parameter, the insertion position is the row where the mouse focus is located

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , insert 3 rows after the row of cell A1 of the report

report.appendReportRC(3,"A1");

Example 2: In the data entry report, insert 3 rows after the row of cell A1 in the report

_g().appendReportRC(3,"A1");

Application

example

When entering data  in the report, click the button to insert the custom number of rows:

Click to download the template:

Insert a Specified Number of Rows.cpt

4.gif

MobileNot support mobile terminal

appendReportRow

Method_g().appendReportRow(cell,sheetindex,num)

To insert a row, it needs to be implemented with the "Insert Row Button"

Note: When using the num parameter, try to adjust the number of rows of the insert row button to 0, which will affect each other and cause confusion

  Parameter

cell:string

sheetindex:number

num:number

cell:The number of the cell where the "Insert Row Button" is located,  string

sheetindex:sheet number, number, starting from 0

num:number of rows inserted, number

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , the insert row button is in the "F1" cell of "sheet1", and 3 rows are inserted

report.appendReportRow("F1"0,3);

Example 2: In the data entry report, insert row button in the "F1" cell of "sheet1", insert 3 rows

_g().appendReportRow("F1"0,3);

Example 3: After getting the insert row button and sheet number through this.options.location, this.options.reportIndex, insert 3 rows

report.appendReportRow(this.options.location,this.options.reportIndex,3);

Example 4: In the data entry report, after obtaining the insert row button and sheet number through this.options.location, this.options.reportIndex, insert 3 rows

_g().appendReportRow(this.options.location,this.options.reportIndex,3);

Application

example

When entering data in the report, click the button to insert the custom number of rows:

For detailed implementation methods, please refer to:JS Insert Customized Number of Rows

5.gif

Mobile Support mobile terminal

deleteReportRC

MethoddeleteReportRC(cell)delete row
  Parameter

cell:string

cell:The cell number of the delete location. If there is no such parameter, the delete position is the row where the mouse focus is located

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , delete the row where the A1 cell is located

report.deleteReportRC("A1");

Example 2: In the data entry report, delete the row where the A1 cell is located

_g().deleteReportRC("A1");

Example 3: In the data entry report, delete the row at the cell position where the mouse is located

_g().deleteReportRC();

Application

example

When entering data in the report, click the button to delete the cell row where the mouse is located:

For detailed implementation methods, please refer to:JS custom insert and delete row buttons

6.gif

MobileNot support mobile terminal

deleteRows

MethoddeleteRows([cell])delete row
  Parameter

cell:string

cell:Array of cell numbers for delete positions

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , delete the row where cells A1 and A2 are located

report.deleteRows(['A1','A2']);

Example 2: In the data entry report, delete the row where cells A1 and A2 are located

_g().deleteRows(['A1','A2']);

Application

example

In the data entry report, realize batch deletion according to the options:

For detailed implementation methods, please refer to:JS implements check button control selection and batch operations

7.gif

MobileNot support mobile terminal

refreshAllSheets

MethodrefreshAllSheets()Re-query, refresh all sheets, after refresh, it will stay on the last viewed sheet
  Parameter

-

-

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , refresh all sheets

report.refreshAllSheets();

Example 2: In the data entry report, refresh all sheets

_g().refreshAllSheets();

Application

example

Click the button to refresh all sheets, and still stay in the current sheet3 after refreshing:

Click to download the template:

Stay in the current sheet after refreshing.cpt

8.gif

MobileSupport mobile terminal

loadSheetByIndex

MethodloadSheetByIndex(index)Switch to the specified sheet, the parameter is the sheet number
  Parameter

index:number

index:sheet number (starting from 0)

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , switch to the second sheet

report.loadSheetByIndex(1);

Example 2: In the data entry report, switch to the second sheet

_g().loadSheetByIndex(1);

Application

example

If there are multiple sheet pages in the report, when previewing, the second sheet page is displayed by default:

Click to download the template:

Display a specific sheet by index.cpt

9.gif

MobileNot support mobile terminal

loadSheetByName

MethodloadSheetByName(name)Switch to the specified sheet, the parameter is the sheet name
  Parameter

name:string

name:sheet name

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , switch to the sheet named "Commodity"

report.loadSheetByName("Commodity");

Example 2: In the data entry report, switch to the sheet named "Commodity"

_g().loadSheetByName("Commodity");

Application

example

If there are multiple sheet pages in the report, when previewing, the sheet page named "sheet2" is displayed by default:

Click to download the template:

Display a specific sheet by name.cpt

10.gif

MobileNot support mobile terminal

writeReport

MethodwriteReport(sheetindex)Force commit, no verification
  Parameter

sheetindex:number

The number of sheets to submit, number, starting from 0, if the parameter is empty, it means submitting all sheets

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , submit the second sheet

report.writeReport(1);

Example 2: In the data entry report, submit the second sheet

_g().writeReport(1);

Application

example

Customize a "Submit" button to submit the filling content when the button is clicked:

Click to download the template:

Mandatory submission without verification.cpt

11.gif

MobileSupport mobile terminal

verifyAndWriteReport

MethodverifyAndWriteReport(isallsheet)Verify and submit reports
  Parameter

isallsheet:boolean

isallsheet:whether to submit all sheets

  • true:submit all sheets

  • false:submit current sheet

Return valuevoid
    Example

Example 1: If the obtained report object is defined as report , submit all sheets

report.verifyAndWriteReport(true);

Example 2: In the data entry report, determine whether to enable automatic temporary storage

_g().verifyAndWriteReport(true);

Application

example

Customize a "Submit" button to verify the submitted content when the button is clicked:

Click to download the template:

Submit after verifying.cpt

12.gif

MobileSupport mobile terminal

verifyReport

MethodverifyReport()Data verification
  Parameter-

-

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , submit for verification

report.verifyReport();

Example 2: In the data entry report and submit it for verification

_g().verifyReport();

Application

example

Customize a "Verify" button to submit the verification when the button is clicked:

Click to download the template:

Customize verify button.cpt

13.gif

MobileSupport mobile terminal

importExcel

MethodimportExcel(importStyle)Import Excel
  Parameter

importStyle:

Import method, string

  • Normal import when not written

  • "customize":custom import

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , call up the function pop-up window for importing Excel, and import Excel in the normal import method

report.verifyReport();

Example 2: In the data entry report, call up the pop-up window of the import Excel function, and import Excel in the normal import method

_g().verifyReport();

Example 3: In the data entry report, call up the pop-up window of the import Excel function, and import Excel in a custom import method

_g().importExcel("customize");

Application

example

Customize a "Import Excel" button, click to import Excel:

Click to download the template:

Import excel with custom import method.cpt

14.gif

MobileNot support mobile terminal

importExcel_Clean

MethodimportExcel_Clean()Import Excel with "Clean Import"
  Parameter-

-

Return valuevoid
   Example

Example 1: If the aobtained report object is defined as report , call up the pop-up window of the import Excel function, and import Excel in the way of "clean import"

report.importExcel_Clean();

Example 2: In the data entry report, call up the pop-up window of the import Excel function, and import Excel in the way of "clean import"

_g().importExcel_Clean();

Application

example

Customize a "Import Excel" button, click to import Excel in the way of "Clean Import":

Click to download the template:

Import excel with clean import method.cpt

15.gif

MobileNot support mobile terminal

importExcel_Append

MethodimportExcel_Append()Import Excel by means of "append import"
  Parameter-

-

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , call up the import Excel function pop-up window, and import Excel by append import

report.importExcel_Append();

Example 2: In the data entry report, call up the pop-up window for importing Excel function, and import Excel in append import mode

_g().importExcel_Append();

Application

example

Customize a "Import Excel" button, click to import Excel with append way:

Click to download the template:

Import excel with append import method.cpt

16.gif

MobileNot support mobile terminal

importExcel_Cover

MethodimportExcel_Cover()Import Excel by the means of "Cover Import"
  Parameter-

-

Return valuevoid
   Example

Example 1: If the obtainedreport object is defined as report , call up the Import Excel: function pop-up window, and import Excel by covering the import

report.importExcel_Cover();

Example 2: In the data entry report, call up the Import Excel: function pop-up window, and import Excel by covering the import

_g().importExcel_Cover();

Application

example

Customize a "Import Excel" button and click to import Excel by covering the import:

Click to download the template:

Import excel with cover import method.cpt

17.gif

MobileNot support mobile terminal

isDirtyPage

MethodisDirtyPage()Determine if a page has been edited
  Parameter

-

-

Return valueboolean

Whether the page has been edited, boolean

  • true:edited

  • false:unedited

   Example

Example 1: If the obtained report object is defined as report , determine whether the page has been edited

report.isDirtyPage();

Example 2: In the data entry report, determine whether the page has been edited

_g().isDirtyPage();

Application

example

Click the button to determine whether the page has been edited:

Click to download the template:

View page edit status.cpt

18.gif

MobileNot support mobile terminal

isAutoStash

MethodisAutoStash()To determine whether to enable automatic temporary storage, please refer to: Data Entry Stash
  Parameter

-

-

Return valueboolean

Whether to enable automatic stash, boolean

  • true:enable

  • false: disable

    Example

Example 1: If the obtained report object is defined as report , determine whether to enable automatic stash

report.isAutoStash();

Example 2: In the data entry report, determine whether to enable automatic stash

_g().isAutoStash();

Application

example

-
MobileNot support mobile terminal

stash

Methodstash(undefined,true)stash
  Parameterundefined,true

Fixed format, which is used to pop up a prompt for successful stash. If you don't need a prompt, just don't write it.

Return valuevoid
   Example

Example 1: If the obtained report object is defined as report , stash and pop up a prompt that the stash is successful

report.stash(undefined,true);

Example 2: In the data entry report, stash and pop up a prompt that the stash is successful

_g().stash(undefined,true);
Example 3: In the data entry report, stash and doesn't pop up a successful stash prompt
_g().stash();

Application

example

-
MobileNot support mobile terminal

clear

Methodclear()clear stash
  Parameter-

None, if you do not need to clear the confirmation reminder and clear the successful prompt, you can write undefined,false

Return valuevoid
   Example

Example 1: If the aobtained report object is defined as report , clear the stash and pop up a prompt to clear the stash successfully

report.clear();

Example 2: In the data entry report, clear the stash and pop up a prompt that the stash is cleared successfully

_g().clear();

Example 3: In the data entry report, the stash is cleared but the clearing confirmation reminder and clearing success prompt do not pop up

_g().clear(undefined,false);

Application

example

-
Mobile Not suppory mobile terminal


Attachment List


Theme: 11.0 New Features
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback