Global search in 1s. Global search and replace. Hotkeys: General Actions

Each solution of the company "1C" on the platform "1C: Enterprise 8" has a wide range of possibilities. However, there are universal techniques that can be used in any configuration. With this article, we open a series of publications in which the methodologists of the 1C company will talk about the universal capabilities of the 1C: Enterprise 8 platform. Let's start with one of the most important methods of increasing work efficiency - with the description of "hot" keys (actions from the keyboard, as a rule, are performed faster than similar ones through the menu using the mouse). Once you've mastered hotkeys, you can make it easier to perform frequently repeated actions.

Table 1

Action

Keyboard shortcuts

How the program works

Create a new document

Open an existing document

Open calculator

Opens the calculator

Show properties

Alt + Enter
Ctrl + E

Open message box

Close message window

Ctrl + Shift + Z

Open the scoreboard

Opens the scoreboard

Open Help

Opens help

Call up help index

Shift + Alt + F1

Calls the help index

Hotkeys: Global Actions

Global actions are actions that you can perform in any state of the program. It doesn't matter what is currently open in 1C: Enterprise. The main thing is that the application is not busy performing any task.

Global actions are actions that can be called anywhere in the running 1C: Enterprise 8 platform. Regardless of what exactly happens in the running configuration, the meaning of global actions does not change (for example, pressing Ctrl + N will always call the dialog for creating a new document).

Table 1

Hotkeys for global actions

Action

Keyboard shortcuts

How the program works

Create a new document

Opens a window in which you will be asked to select the type of new document to be created in various formats - for example, in text, tabular or HTML

Open an existing document

Opens the standard "Open" dialog box, available through the "File / Open ..." menu.

Activating the search box in the command bar

Sets the cursor to this field

Open calculator

Opens the calculator

Show properties

Alt + Enter
Ctrl + E

Depending on where the cursor is positioned, it opens the corresponding palette of properties for this object or element. Useful when working with tables, text, HTML, and more.

Open message box

Opens a previously closed message window. It is often useful when a window is accidentally closed and you need a message from it. Please note: while the system has not entered anything into the message window again, old messages are saved even in a closed window

Close message window

Ctrl + Shift + Z

Closes the message box when they are no longer needed. Please note: the combination is selected so that it is easy to press it with one hand

Open the scoreboard

Opens the scoreboard

Open Help

Opens help

Call up help index

Shift + Alt + F1

Calls the help index

Hotkeys: General Actions

General actions- actions that have the same meaning in various configuration objects, but the behavior of the 1C: Enterprise 8 platform changes depending on where exactly you use this or that general action. For example, pressing the "Del" key marks the current element of the directory for deletion if you are in the window of the list of directory elements. Or deletes the contents of the current cell of the spreadsheet document if you are editing it.

table 2

Hotkeys for general actions

Action

Keyboard shortcuts

How the program works

Deletes the item under the cursor (the current item) or a selected group of items

Add

Lets you add a new item

Saves the active document

Print active document

Calls the print dialog for the active document

Printing to current printer

Ctrl + Shift + P

Initiates direct printing of the active document to the printer assigned in the system by default (without opening the print dialog)

Copy to clipboard

Ctrl + C
Ctrl + Ins

Copies the required item or selected group of items to the Windows clipboard

Cut to clipboard

Ctrl + X
Shift + Del

Cuts the required element or the selected group of elements to the Windows clipboard. Differs from copying in that the copied element or group is deleted after entering the buffer

Paste from clipboard

Ctrl + V
Shift + Ins

Pastes data from the Windows clipboard to the location marked by the cursor

Add to clipboard as a number

Shift + Num + (*)

Used for numeric values

Add to clipboard

Shift + Num + (+)

Used for numeric values. Add operation with data in the clipboard

Subtract from clipboard

Shift + Num + (-)

Used for numeric values. Subtraction operation on data in the clipboard

Select all

Undo the last action

Ctrl + Z
Alt + BackSpace

Redo the undone action

Ctrl + Y
Shift + Alt + BackSpace

Find next

Find next highlighted

Find Previous

Find Previous Selected

Ctrl + Shift + F3

Replace

Ctrl + Num + (-)

Select all

Selects all available elements in the active document

Undo the last action

Ctrl + Z
Alt + BackSpace

Undoes the last action taken

Redo the undone action

Ctrl + Y
Shift + Alt + BackSpace

Allows you to undo "Ctrl + Z", in other words - to return what you did before pressing the undo of the last performed action

Opens a dialog for setting search parameters in the active configuration object and performing this search

Find next

Finds the next item that matches the parameters specified in the search settings

Find next highlighted

Finds the next item that matches the one you selected (for example, where the cursor is positioned)

Find Previous

Finds the previous item that matches the parameters specified in the search settings

Find Previous Selected

Ctrl + Shift + F3

Finds the previous item that matches the one you selected

Replace

Opens the dialog for finding and replacing values ​​(where permitted)

Collapse (tree node, spreadsheet document group, module grouping)

Ctrl + Num + (-)

Used where tree nodes are available, marked with "+" or "-"

Collapse (tree node, spreadsheet document group, module grouping) and all subordinates

Ctrl + Alt + Num + (-)

Minimize (all tree nodes, groups of a spreadsheet document, groupings of a module)

Ctrl + Shift + Num + (-)

Expand (tree node, spreadsheet document group, module grouping)

Ctrl + Num + (+)

Expand (tree node, spreadsheet document group, module grouping) and all subordinates

Ctrl + Alt + Num + (+)

Expand (all tree nodes, groups of a spreadsheet document, groupings of a module)

Ctrl + Shift + Num + (+)

Next page

Ctrl + Page Down
Ctrl + Alt + F

Fast flipping of the active document

Previous page

Ctrl + Page Up
Ctrl + Alt + B

Turn on / off fat content

Used where text formatting is supported and possible

Turn italic on / off

Turn underline on / off

Go to the previous web page / help chapter

Used in HTML documents

Move to next web page / help chapter

Abort the execution of the data composition system report

Hotkeys: window management

This section combines hot keys common to all windows and forms of the 1C: Enterprise platform.

Table 3

"Hot" keys for managing windows

Action

Keyboard shortcuts

How the program works

Close active free window, modal dialog or application

This combination can quickly complete the entire configuration on the 1C: Enterprise platform, so use it carefully

Close active regular window

Closes the current regular window

Close active window

Closes the currently active window

Activate the next regular window

Ctrl + Tab
Ctrl + F6

Allows to activate the next window among those opened within the configuration. Pressing in a loop while holding down the Ctrl key allows you to scroll forward through the open windows

Activate the previous normal window

Ctrl + Shift + Tab
Ctrl + Shift + F6

Allows to activate the previous window among those opened within the configuration. Pressing in a loop while holding down the Ctrl key allows you to scroll through the open windows "back"

Activate the next section of the window

Activates the next section of the current window

Activate the previous section of the window

Activates the previous section of the current window

Call the system menu of the application or modal dialog

Allows you to see the system menu of operations (minimize, move, close, etc.) above the program window or open modal dialog

Call the window system menu (except modal dialogs)

Alt + Hyphen + (-)
Alt + Num + (-)

Allows you to see the system menu of operations (minimize, move, close, etc.) above the active window

Call the main menu

Activates the main panel with the buttons of the current window. Thus, you can select actions without the participation of the mouse.

Call the context menu

Displays a context menu above the currently active item. Same as right-clicking on it

Return activity to a regular window

Returns activity to the regular window after working with the context menu. Attention! In any other case, Esc initiates the closing of the active window.

Hot Keys: Form Control

Here you can find hot keys that simplify and speed up work with various forms that are created in configurations written on the 1C: Enterprise platform.

Table 4

"Hot" keys for managing forms

Action

Keyboard shortcuts

How the program works

Move to next control / call default button

Transition between controls on the "forward" form (see Tab)

Calling the default button

As a rule, various forms have a default button assigned (it differs from others - for example, it is highlighted in bold). Using this key combination allows you to activate the default button from anywhere in the open form.

Move to next control

Move between controls on the "forward" form

Move to previous control

Move between controls on a "back" form

Activates the command bar associated with the active control / form

Activates the main panel with buttons of the current form. Thus, you can select actions without the participation of the mouse.

Navigating through controls that are grouped together

Up
Down
Left
Right

Using the arrow keys, you can quickly navigate between grouped controls

Close the form

Closes the window of the current form

Restore window position

If some parameters of the form window are lost, this combination allows you to return everything back

"Hot" keys: work with the list and the tree

The "hot" keys of this section will help you to work effectively without using a mouse in numerous lists and trees that are actively used in various configuration objects on the 1C: Enterprise 8 platform.

Table 5

"Hot" keys for working with the list and tree

Action

Keyboard shortcuts

How the program works

Opens the element where the cursor is positioned for editing. The key is the same as the "Modify" action on the standard form button bar

Refresh

Ctrl + Shift + R
F5

Refreshes data in a list or tree. Especially useful for dynamic lists (for example, a list of documents), when auto-update is not enabled for them.

Copy

Creates a new list item using the current item as a template. Similar to the "Add by copying" button

A new group

Creates a new group. Similar to the "Add Group" button

Deleting a line

Direct removal of the current item. Attention! Use this combination with great care in dynamic lists, as you cannot undo the deletion.

Move line up

Ctrl + Shift + Up

In lists where line reordering is allowed, allows to move the current line up. Same as Move Up button

Move line down

Ctrl + Shift + Down

In lists where line reordering is allowed, allows to move the current line down. Same as Move Down button

Move item to another group

Ctrl + Shift + M
Ctrl + F5

Allows you to quickly move the current item (for example, a directory) to another group

Move one level down while expanding the group

Goes inside the folder where the cursor was positioned

Move up one level (to "parent")

Goes to the top of the folder you were in

Finish editing

Finishes editing the list item with saving changes

Abort search

Aborts search

Expand a tree node

Used where tree nodes are available, marked with "+" or "-"

Close tree node

Expand all tree nodes

Change checkbox

Inverts the value of the checkbox of the current item (turns it on or off)

"Hot" keys: input field

Entry field- actively used control in many places of configuration forms. "Hot" keys for an input field allow you to quickly perform frequently used actions on it. It is especially useful to use these keys where the configuration developer did not display the input field control buttons you need.

Table 6

"Hot" keys for the input field

Action

Keyboard shortcuts

How the program works

Similar to the behavior when editing regular text, it allows you to either add new characters as you type to the old ones, or overwrite old ones with new ones.

Selection button

Selecting the appropriate object associated with the input field (for example, selecting the desired document from the list). Similar to the "Select" input field button

Open button

Ctrl + Shift + F4

Opens the form of the selected object in the current input field. Similar to clicking the "Open" input field button

Clear field

Clear an input field from its current value

Working with typed text in the input field

Ctrl + BackSpace

Move to the beginning of a line

Move to end of line

Mouse Up Button for Adjustment Button

Use adjustment if allowed in the input field. For example, changing dates, counters, etc. It is similar to pressing the "up" button of the input field controller

Mouse Down Button for Adjustment Button

Use adjustment if allowed in the input field. For example, changing dates, counters, etc. It is similar to pressing the "down" button of the input field controller

Hot keys: picture field

Field clip art is a standard element of the 1C: Enterprise 8 platform for displaying graphic images. "Hot" keys will help, for example, to comfortably view the image located in the picture field.

Table 7

"Hot" keys for the picture field

Action

Keyboard shortcuts

How the program works

Zoom in

Scales the picture

Zoom out

Scroll

Up
Down
Left
Right

Moving around the picture

Scroll up by window size

Scroll down by window size

Scroll left by window size

Scroll right by window size

Hotkeys: spreadsheet document editor

This section contains hot keys for various spreadsheet documents. They can be very useful if you frequently edit data in such documents.

Table 8

"Hot" keys for the editor of spreadsheet documents

Action

Keyboard shortcuts

How the program works

Go to cell

Opens a dialog box for navigating to a cell with column / row coordinates

Move through cells

Up
Down
Left
Right

Moves the cursor over the table cells

Move through cells to the next filled or empty

Ctrl + (Up, Down, Left, Right)

Moves the cursor over the filled table cells

Selecting cells

Shift + (Up, Down, Left, Right)

Selects a region of cells starting with the current one

Scroll up one page

Scrolls through a spreadsheet document

Scroll down one page

Scroll left one page

Scroll right one page

Go to editing cell content

Turns on cell content editing mode

Switching edit / input mode in a cell

Move to the beginning of a line

Moves the cursor to the beginning of the line

Move to end of line

Moves the cursor to the end of the line

Move to the beginning of the text

Move to the end of the text

Setting the name of the current area

Ctrl + Shift + N

Sets the name of the current region of cells

Hotkeys: Text Document Editor

"Hot" keys when editing text in text areas and documents can significantly speed up and simplify the process.

Table 9

"Hot" keys for the editor of text documents

Action

Keyboard shortcuts

How the program works

Toggle insert / replace mode

Allows you to either add new characters as you type to the old ones, or overwrite old ones with new ones

Move to the beginning of a line

Moves the cursor to the beginning of the current line

Move to end of line

Moves the cursor to the end of the current line

Select to start of line

Selects text to the beginning of the line

Select to end of line

Selects text to the end of the line

Move to the beginning of the text

Moves the cursor to the beginning of the text

Move to the end of the text

Moves the cursor to the end of the text

Select to start of text

Ctrl + Shift + Home

Selects from cursor to start of text

Select to end of text

Ctrl + Shift + End

Selects from cursor to end of text

Scroll up one line

Scrolls through a text document

Scroll down one line

Move to the beginning of the previous word

Move to the beginning of the next word

Highlight previous word

Ctrl + Shift + Left

Fast word selection (characters separated by spaces)

Highlight next word

Ctrl + Shift + Right

Scroll up one page

Scrolls through a text document

Scroll down one page

Select the previous page of text

Selects text by page

Select next page of text

Shift + Page Down

Remove selection

Removes selection

Go to line

Moves cursor to line numbered

Delete character to the left of the cursor

Deletes the character to the left of the cursor

Delete character to the right of the cursor

Deletes the character to the right of the cursor

Delete word to the left of cursor

Ctrl + BackSpace

Deletes the word to the left of the cursor

Delete word to the right of cursor

Deletes the word to the right of the cursor

Set / remove bookmark

Marks the line you want

Next bookmark

Moves the cursor between the bookmarked lines

Previous bookmark

Delete current line

Deletes the current line

Move block to the right

Shifts the selected block of text to the right

Move Block Left

Shifts the selected block of text to the left

Print (Ctrl + P)

The global search and replace mode is designed to search for a specific string in all modules, dialogs, spreadsheet documents,
configuration descriptions and external files (external reports and processing, spreadsheet documents). Found text can be
replaced by another. This mode can be used, for example, to search for all calls of some global procedure or
referring to any attribute in different modules.
The search mode is invoked by selecting the item Edit - Global Search, and overwrite mode - by selecting Edit -
Global replacement.
These modes use the same dialogue. If the search mode is selected, the details of the replacement mode become unavailable.
Therefore, for brevity, we will consider the global replacement procedure, and then indicate the features of the search mode.
A dialog for specifying search parameters will be displayed on the screen.

In the Search field of this dialog, enter a search pattern or select one of the patterns that were previously used in search operations from the history list.
In the Replace field, you need to enter the text to replace the found text with, or select one of the patterns that were used earlier in the replacement operations from the history list.
To distinguish between uppercase and lowercase letters when searching, select the checkbox. Case sensitive... When the Search for whole word check box is selected, only whole words will be found, not parts of words.
If you do not need to open the editors during a group replacement (by clicking the Replace all button), then you must select the Do not open editors during group replacement check box. In any state of the checkbox, the editor will open when you press the Search key or
Replace .
Below there is a panel, on the tabs of which it is indicated where to look for the specified sample.

On the Text types tab, the types of objects in which the search will be performed are marked. If the configuration is edited for run mode Managed Application, then user interfaces will be excluded from the list of objects.

On the Configurations tab, you can specify, up to an object, the configuration sections to be searched for. The list of configurations, in addition to the main one, includes the database configuration, storage configuration, extension configuration (if they are open) and extension configuration saved to the database (for open extensions). Storage configurations must be open before invoking find or replace mode. Database configurations (main and extensions) are available only when using global search.
To specify a set of objects, set the Selected objects radio button and mark those objects in which the search will be performed. On the first launch, the list is checked by default for all objects. To remove the installation, you must
uncheck the box in the line with the name of the configuration. Then you can specify specific objects to search for.

On the Files tab, you can specify the directory and file types that can be searched. The following types of viewed files can be viewed: configurations located in files (saved, delivery files), external reports and processing, text and tabular documents. If the directory is not specified (the Directory attribute is not filled in), then the search in the files is not performed. The search can also be performed in open documents of the same types. To do this, check the box Search in
open documents.
The selected set of settings can be saved for future use. To do this, enter the name of the setting in the Search scope field. To use the previous setting, just select the setting name in the drop-down list. Are saved
the following settings: settings on the Text types tab, the composition of objects only for the main configuration on the Configurations and settings tab on the Files tab.
If the search mode has been launched, then to start the search, you need to click the Search button.
In global search mode, you can interrupt the process by pressing Ctrl + Break.
To the screen to the window searching results a list of found occurrences of the source text will be displayed.
If any module has an access restriction (see here), then before searching for the source text in this module, the system asks for an access password. You must enter the correct password or refuse to enter the password. If no password is entered, then
viewing in this module is not performed.
The search result can be viewed, and you can go to each found value if you select the desired line as a result of the search and press the key Enter... To view the next or previous found value, you can use the items
Actions - Next Position and Actions - Previous Position.
The search result (the entire list) can be saved to the clipboard using the Copy command of the window context menu or by using the corresponding button on the toolbar of the search results window, as well as output to a table or text
document.
The width of the columns can be changed in a standard way - using the mouse pointer while holding down the Ctrl key.
If the overwrite mode has been started, then in the To text field, a sample text is indicated, with which the original text specified in the Overwrite field should be replaced.
If you need to look at the original text before replacing, then to start the search, click the Search button. The result of the first source text found is displayed on the screen. If you click the Search button again, the current text will be skipped and the next occurrence of the source text in the current window or another window containing the source text will be displayed.
A group replacement (without confirming each replacement) will be performed by clicking the Replace All button. If in this case you do not need to open objects in which an occurrence of the original text was found, then you should select the Do not open checkbox.
editors for group replacement.
ATTENTION! You cannot change the search terms while viewing the search results.
The structure of the search area selection (text types, a list of configuration objects, files and open documents) is remembered and is restored the next time the dialog is opened. If you want to save several areas, then each area in the Search area attribute must be given a name. When you reopen the search window in the list of areas, just select the one you need and perform the search.

Full text search- will allow you to find text information located almost anywhere in the configuration used. In this case, you can search for the required data either for the entire configuration as a whole, or by narrowing the search area to several objects (for example, certain types of documents or directories). The search criteria themselves can vary over a fairly wide range. That is, you can find the data you need without even remembering exactly where it is stored in the configuration and how it is written.

Full-text search provides the following capabilities:

  • There is support for transliteration (writing Russian words in Latin characters in accordance with GOST 7.79-2000). Example: "Russian phrase" = "Russian fraza".
  • There is support for substitution (writing part of the characters in Russian words with single-key Latin characters). Example: "russrfz phpf" (the endings of each word are typed in Latin, for example, as a result of an operator error).
  • There is a possibility of a fuzzy search (the letters in the found words may differ) with an indication of the fuzzy threshold. Example: by specifying the word "hello" and the fuzziness of 17% in the search line, we will find all similar words with and without errors: "hello", "hello", "give".
  • It is possible to specify the scope of the search for the selected metadata objects.
  • Full-text indexing of the names of standard fields ("Code", "Name", etc.) is performed in all configuration languages.
  • The search is performed taking into account synonyms of Russian, English and Ukrainian languages.
  • The morphological dictionary of the Russian language contains a number of specific words related to the areas of activity that are automated using the 1C: Enterprise software system.
  • As a standard, the supplied dictionaries include dictionary bases and dictionaries of the thesaurus and synonyms of the Russian, Ukrainian and English languages, which are provided by the "Informatik" company.
  • You can search using wildcards ("*"), as well as specifying search operators ("AND", "OR", "NOT", "NEXT") and special characters.

Full-text search can be performed in any configuration on the 1C: Enterprise 8 platform

In order to open the full-text search control window, do the following:

Regular application- menu item Operations - Full Text Search Management.

Managed Application- menu item Main Menu - All Functions - Standard -Full-text search management.


  • Update index- Index creation / Index update;
  • Clear index- zeroing the index (recommended after updating all data);
  • See Allow Index Merging- is responsible for merging the main and secondary index.

Full-text search is performed using the full-text index. In the absence of an index, full-text search as such is not possible. For a search to be successful, all the data required must be included in the full-text index. If the user has entered new data into the database, they should be included in the index in question, otherwise they will not participate in the search. To avoid this, you must update the full-text index. When updating, the system analyzes only certain types of data: String, Data of reference type (links to documents, reference books), Number, Date, StorageValues. If the user does not have access rights to certain information, then he will not be able to see it in the search results. It should also be remembered that in the properties of the objects by which the search will occur, the value Full Text Search - Use which is set by default.

As you can see the property Use installed for the entire directory Contractors, but this can be done for each of its attributes of the corresponding type.

Let's take a closer look at the full-text index, which consists of two parts (indexes): the main index and the secondary index. The main index provides high speed data searches, but updates are relatively slow depending on the amount of data. The supplementary index is the opposite of it. Data is added to it much faster, but searches are slower. The system searches simultaneously in both indexes. Most of the data is in the main index, and the data added to the system goes into the secondary index. While the amount of data in the secondary index is small, searches on it are relatively fast. At a time when the load on the system is light, an index merge operation occurs, as a result of which the secondary index is flushed, and all data is placed in the main index. It is preferable to merge indexes at a time when the load on the system is minimal. For this purpose, you can create scheduled tasks and tasks on a schedule.

Special operators allowed when specifying a search expression

The full-text search engine allows writing part of the characters of the Russian word with single-key Latin characters. This will not change the search result.

Two operators NEARBY

  • simplified. 8 words apart
  • NEAR / [+/-] n - search for data in one variable at a distance of n-1 words between them.

The sign indicates in which direction from the first word the search for the second will be. (+ - after, - before)

The wildcard "*" can only be used as a replacement for the end of a word

Fuzzy operator "#". If the exact spelling of the name, name is unknown.

Software and means 1c: programming.

The synonym operator "!" Allows you to find a word and its synonyms

How do I programmatically update the full-text search index?

Code 1C v 8.x Procedure Updating Indexes () Export
FulltextSearch.UpdateIndex ();
End of Procedure

An example of a full-text data search

Defining a SearchList variable

Code 1C v 8.x Variable Search List;

In addition, in the procedure for handling the event when Opening the form, we will define that this variable will contain a list of full-text search, with which we will search the data

Code 1C v 8.x Opening Procedure ()
SearchList = FulltextSearch.CreateList ();
End of Procedure

Now, for the event of clicking on the Find button, we will write a code that will allow us to perform a search in accordance with the expression specified in the Search Expression field

Code 1C v 8.x Procedure FindPress (Element)
SearchList.SearchStar = SearchExpression;
Attempt
SearchList.FirstPart ();
An exception
Warning (Error Description ());
End of Attempts;
If SearchList.FullCount () = 0 Then
Form Elements.Result Message.Value = "Not Found";
Form Elements.SearchResult.SetText ("");
Otherwise
OutputSearchResult ();
EndIf;
End of Procedure

First, in this procedure, we set the search expression entered by the user as the search string for a full text search. Then we execute the FirstPart () method, which actually starts the full-text search and returns the first portion of the results. By default, a chunk contains 20 items. After that, we analyze the number of items in the search list. If it does not contain any element, then we display the corresponding message in the form. Otherwise, the DisplaySearchResult () procedure is called, which displays the retrieved results to the user.

Let's create a procedure with this name in the form module and write the code in it,

Code 1C v 8.x Procedure Output Search Result ()
Form Elements.MessageAboutResult.Value = "Shown" + String (SearchList.StartPosition () + 1) + "-" + String (SearchList.StartPosition () + SearchList.Number ()) + "from" + SearchList.FullNumber ();
Result = SearchList.GetDisplay (DisplayKind of FullTextSearch.HTMLText);
Form Elements.SearchResult.SetText (Result);
AccessibilityButtons ();
End of Procedure

The steps in this procedure are simple. First, we form a message about which items are displayed and how many items were found in total. Then we get the result of the full-text search in the form of HTML-text and display this text in the field of the HTML-document located in the form.

Finally, we transfer control to the Buttons Accessibility () procedure in order to make available or, conversely, deny access to the Previous portion and Next portion buttons (depending on which portion of the results obtained is displayed). The text of this procedure is presented in Code

Code 1C v 8.x Procedure Button Accessibility ()
Form Elements.NextPortion.Availability = (SearchList.FullQuantity () - SearchList.StartPosition ())> SearchList.Number ();
Form Elements.PreviousPortion.Availability = (SearchList.StartPosition ()> 0);
End of Procedure

Now you need to create event handlers for clicking the PreviousPortion () and NextPortion () buttons.

Code 1C v 8.x Procedure Previous Portion Pressing (Element)
SearchList.PreviousPart ();
OutputSearchResult ();
End of Procedure
Procedure Next Serve Press (Element)
SearchList.NextPart ();
OutputSearchResult ();
End of Procedure

The final touch is to create an onclick event handler for the HTML field on the form. The fact is that the result of a full-text search, presented in the form of HTML-text, contains hyperlinks to the numbers of the elements of the search list. And we would like the system to open the form of the object that is contained in this list item when the user navigates to this link. To do this, we will intercept the onclick event of the HTML document contained in the HTML document field, get the list item number from the hyperlink, and open the form of the corresponding object. The text of the onclick event handler of the HTML document field is presented in the code

Code 1C v 8.x Procedure Search Result onclick (Element, pEvtObj)
htmlElement = pEvtObj.srcElement;
// Check element id
If (htmlElement.id = "FullTextSearchListItem") Then
// Get the file name (line number of the search list),
// contained in the hyperlink
NumberVSlist = Number (htmlElement.nameProp);
// Get the string of the search list by number
SelectedString = SearchList [NumberVSList];
// Open the form of the found object
OpenValue (SelectedString.Value);
pEvtObj.returnValue = False;
EndIf;
End of Procedure

Tricks when working in 1C: Accounting 8.3 (revision 3.0) Part 2

2017-02-09T10: 31: 17 + 00: 00

With this article, I continue a series of notes on effective techniques for working in 1C: Accounting 8.3. I'm talking about tricks that few people know and even fewer people use in their work. The techniques that will be discussed can significantly save time and improve your qualifications as a specialist. The first part is available.
P

Reception number 4: Search in the current column immediately after the start of typing.

How are you not yet taking advantage of this amazing opportunity? In any magazine (be it a reference book or documents), select any line in any column and just start typing.

The system will automatically select rows that contain the value you enter in one of the columns:

If you need to cancel the filter, press the Esc key on your keyboard or on the cross in the search field:

But what if we need to search not in all columns, but only in a specific one?

To search in the current (selected) column, use the Alt + F combination or the "More" -> "Advanced Search" menu item:

For instant selection (without displaying the dialog box) by the current column and by the value selected in it, use the Ctrl + Alt + F combination or the "More" -> "Find: ..." menu item.

For example, let's select all documents in the number of which the number 8 is found. To do this, select the "Number" column in any line and press Alt + F.

In the window that opens, enter the number 8 and click "Find":

Great, the list contains documents whose number (in any position) contains the number 8:

To cancel the selection, press the Ctrl + Q combination or remove the selection from the top panel (cross):

Attention! If the search does not work (an empty selection is obtained), you probably have full-text search enabled and its index has not been updated.

Full-text search is configured in the "Administration" section, the "Support and Service" item:

Reception number 5: Entering into the input field by line.

Suppose you need to fill in the counterparty field in the document "Receipt of goods and services" and you know that the counterparty is called somehow in "aero".

And you, instead of choosing a counterparty from the list, just take it and start typing the text "aero" in the counterparty input field. As you can see, the system itself suggests possible options for counterparties that begin with these letters. The desired Aeroflot has been found - all that remains is to select it.

And so it is possible in any fields!

Technique # 6: Summing the selected cells in reports.

Just select the necessary cells with the mouse - the amount will be automatically displayed in the field indicated in the figure. And if you need to select cells that are not adjacent, use the CTRL key. Hold it down and select the required cells in the report to get their sum.

Technique # 7: Save any printable in any convenient format.

Any report or printed form of a document can be saved in a suitable format to a computer. Just form a printable and click on the floppy disk icon at the top of the program window.

Now choose a name and format for your document. It can be excel, word, pdf, html and many other popular formats.

In this article I will tell you about the quick search function of 1C Enterprise 8. What is quick search? Very simple. Quick search is one of the ways to navigate large lists of 1C records. These can be lists of documents, directories, registers - everything that is represented by tables.

What is quick search?

The quick search function in 1C Enterprise documents is extremely convenient and allows you not to scroll through huge amounts of data (for example, using a scroll bar), but to go directly to the desired place in the list. Unfortunately, novice users of 1C Enterprise 8 (including 1C Accounting 8) at first do not use the quick search capabilities, preferring to scroll through the lists of documents manually (and they can be very large). This article will help you figure out how to use quick search in 1C.

First of all, it should be noted that in 1C Enterprise 8 configurations, built on managed forms, quick search works differently than in previous versions of 1C. Therefore, we will analyze separately the use of quick search in managed forms and in regular forms.

Quick search in 1C Accounting 8.2

In versions of 1C Accounting from 8.0 to 8.2 the function is intended specifically for transition to the desired part of the list. For example, look at the chart of accounts window shown in the figure.


A certain line is highlighted in the window. Notice the subtle triangle of stripes indicated by the red arrow. As in other Windows programs where there are lists (for example, in Explorer), the position of this marker (triangle) determines the sorting of the list as a whole - in which column the marker is set, the entire list will be sorted by that column. In the figure, the marker is in the Code column, therefore the accounts in the chart of accounts will be sorted by code.

The marker can be moved from one column to another by clicking on the desired column ( on the HEADER of the column!) with the mouse. If the marker is already in the current column, then clicking will change the sorting direction to the opposite (i.e. from larger to smaller or vice versa). This is the standard behavior for all Windows programs. What is the peculiarity of this marker in 1C Enterprise and how is it related to fast search?

A quick search in the 1C Enterprise 8 lists is carried out by the column in which the marker is located. In this case, a quick search in the chart of accounts will be carried out by the Code column.

There was an important part of the article, but without JavaScript it is not visible!

How to use quick search in 1C? Easy! Just start typing what you want to find in THIS column, i.e. where the marker is. In the example in the picture above, the account number must be entered. For example, you want to find account 50 Cashier. In this case, enter ( you don't need to click anywhere!) the number 50 from the keyboard, and if there is an account with this number in this column (and of course there is one), then the list will scroll to this line, and the line itself will be highlighted. The result is shown in the screenshot of the chart of accounts below.

site_

The text pointed to by the arrow is no need to wash- he himself will disappear.

If in the given example you start to enter the word "Cashier", then the text in the lower part of the window will be entered and then erased. This happens because as soon as Start of the entered quick search string ceases to coincide with the beginning of at least one line in this column, 1C Enterprise concludes that the search string was not found and automatically erases it. Concerning there are two rules to remember.

In 1C Enterprise 8, a quick search is performed at the beginning of the line, i.e. the column searches for a match of the entered text with the beginning of one of the lines of this column.
This leads to an important recommendation: when entering data into directories, name the elements so that it is convenient to search for them using a quick search. For example, the name of the counterparty is better written as "NameFirm LLC" than "LLC NameFirmy". Moreover, you should not use quotation marks and other unnecessary symbols in the name (we are talking about filling in the Name field in forms).

If you start typing text, and it is erased - what you are looking for is not in this column! In this case, check the input language, as well as the column in which the quick search is performed. A common mistake is that the wrong column is selected. For example, the marker is set in the Code column, and the search is performed by the name of the account.

Quick search in 1C Accounting 8.3

Now let's see how fast search differs in 1C Enterprise 8.3. Usage is very similar to 8.2, but there is one significant difference to remember.

In 1C Accounting 8.3, as well as in any other configurations on managed forms (the same new interface), it works as a filter. Simply put, as a result of the quick search function, part of the list hiding.

How to use this, we will now find out with you. First, look at the screenshot of the 1C Accounting 8.3 chart of accounts window below.

site_

As you can see, the same marker is in one of the columns. The search is also performed by the column in which the marker is set. All this remained unchanged. However, if you start entering text (in the example, the account number), the following will happen.

site_

As you can see, the search box just opened automatically. The same window will open if you click on the search button on the window toolbar (underlined in the figure). As a result, when you click the Find button in the search window (hidden behind the drop-down menu in the picture) or just Enter, you get the following result.

site_

From this it is clear that quick search in 1C Accounting 8.3 just leaves visible part of the list that meets the search conditions. In this case, the Find button disappears, and instead a lens with a cross appears (underlined in the figure), when you click on it, the list returns to its original state (the line found as a result of a quick search remains highlighted).

Another important feature of fast search in 1C Accounting 8.3- a match is not searched for at the beginning of a line, as in version 8.2, but a search is performed for a match with any part of the lines in the column. Thus, if the counterparty is called "NameFirm LLC", and when searching start to enter "NameFirm LLC", then the line will still be found!

Drawing conclusions

Thus, a quick search in 1C Accounting 8.2 and earlier is intended to scroll the list to the desired line, and in 1C Accounting 8.3, a quick search works like a regular filter, hiding the part of the list you do not need.