How can I select the type (type) of the document? Type of document in 1s 8.2.

Zapit . Text = "VIBRATI | unit of Zberigannya.Posilannya |Z | Adv. // Example 1. Replacement with unidentified Boolean values: |DE | UnityZberigannya.AllowVidbirZReservoirZone = Nonsense // Example 2. Ale yakshto tse Boolean is designated, more simply like this: // mind on a negative Boolean: |DE | DO NOT select the Saving Zone. Allow to select from the Reserve Zone // Example 3. selection behind the mind of an unrestricted field, which is the type “adviser of a specific type” |DE | useUnitSelection.ActiveSelectionArea = VALUE(Value.usSelectionArea.EmptySelection) // Butt 3a. selecting an unfilled field that contains the type “document of a specific type” |DE | OurVideoRegister.Document = VALUE(Document.OurDocument.EmptyPosition) // Butt 3b. selecting an unfilled field that contains the type “documents of various types” ( warehouse field) |DE | (OurHouseRegister.Document = VALUE(Document.OurDocument1.EmptyPosition) | ABO OurHomeRegister.Document = VALUE(Document.OurDocument2.EmptyPosition) | ABO...(etc. - consistently over-recovery for all possible types in whose warehouse field) ) // Example 4. Otherwise, if you need to select a row type, then use the brain: |DE | unit of Zberigannya. Name > """" // Example 5. When it is necessary to select documents of a specific type, with a warehoused data type, for example, in the register “Inventory to be saved”, the resource “Inventory” has a warehouse type, the middle value of which is a possible document “Vidbir” |DE | VIRAZITY (Register of ViewsVikonuvan_Zavdannya.Zavdannya YAK Document.Selection) POSILANNYA Document.Selection // Butt 5a. Another similar butt, if you need to select a specific type of document | VIBIR | WHEN VIRASITI(agVidpovіdnіstDocumentiv.DocumentBU YAK Document.Reliability of Goods and Services) POSILANNYA Document.Reliability of Goods and Services | TODI "Product Supply" | WHEN VIRASITI(agVidpov_dnіstDocuments.DocumentBU YAK Document.Sale of Goods and Services) POSILANNYA Document.Sale of Goods and Services | TODI "Realization of Products and Services" | Otherwise """ | KINETS YAK Document Type // Example 6. Vibe behind the mind of no song significance: |DE | SavingNalashtuvannya.Koristuvach = UNKNOWN // Example 7. Vibration by type of movement “Arrival” to the register of accumulation, “Vitrata” - similar): |DE | RegProductsInGroup.VidiRukhu = VALUE(VisRukhuAccumulation.Incoming) // Example 8. How to indicate in a query that there is no need to delete the query (for example, you need to programmatically, in a manner that is mindful, turn the empty result of the query - Query.Text = StrReplace(Request.Text, "DE Doc. , "DE BREKHNYA") ;). For this, it is enough to add to the mind “De Brekhnya.” |DE BREHNYA // Example 9. Verification of the fact that the result of Viconnia will be filled with data: I'm notZapit.Viconati().Empty() Todi // Example 10. Select a mental unknown date: |DE | tbRows.DateSkapped = DATETIME(1, 1, 1)

1C allows you to significantly simplify accounting or simply manage any organization, be it a small store or a large enterprise. The program is a great database management system. To avoid getting lost in everything, you must remember to understand the various simple things and understand the essence. Then you will understand how to check the type of value in a record in 1C, as well as how they occur, as well as how to separate them.

Tipi meaning

1C: Enterprise has included a special function in new versions (platform 8.2). Following this, you can add any special parameters to any names or elements of the data system. This was done in order to make the system easier to edit and add new elements to. This function is specifically called “Value Type”.

In fact, it’s one of the basic things to understand how to deal with most of our programming. With this help, you can classify various data. For example: date, numbers, rows, order. This is just a basic classification. There could be a lot more of them. For example, if you enter information about places into your system, you can select: continent, country, region, etc.

Re-verification

You can check that other field using additional language queries. And more precisely, its function: VALUE. So, if we want to know, information of any kind should be placed in the middle, what to click, we must quickly act as a command.

VALUETYPE(Value) = TYPE(Row)

On the butt, we were identified, quickly using the command in the simplest form. I’ll ask another example of verification:

Documents

There are plenty of species to choose from, so people can treat them like cobs, and enter their own to improve the information base. The axis deals with them.

  • DocumentPosilannya. It is necessary to manually save various objects in the middle of other parts of the system.
  • DocumentObject - editing documents.
  • DocumentSelection - sorting through objects from the database.

In addition, there are special terms that characterize any data:

  • form;
  • row;
  • boolean;
  • number;
  • date of;
  • array;
  • ensign;
  • picture.

Most of them are part of it. Any object may be removed from this list. Bullovo is a special parameter that conveys two meanings: truth and nonsense. There are also special tags that allow you to customize queries: if, if, how, otherwise, etc. They set the program behavior algorithm. 1C suggests that these words here, like і rashta, can be written in Russian.

It is important to understand that everything is understood by novices and non-professionals as Chinese literacy. To understand what it takes to effectively use 1C, you need to know the basics of programming. Using the 1C program, you can check the typing type and it will be easy, equal to other activities.

The language of 1C queries is one of the main features between versions 7.7 and 8. One of the most important points in the developed 1C programming is the language of queries. In 1C 8.3, write down is the most powerful and most effective tool for extracting data. The query language allows you to manually retrieve information from the database.

The syntax itself is very reminiscent of classic T-SQL, in addition, in 1C, using additional queries, you can also extract data using the Select construct. The language also supports folding structures, for example, (requested). You can write in 1C8 either in Cyrillic or in Latin.

In the article, I will learn about the main keywords in 1C queries:

  • vibrate
  • allowed
  • carnage
  • vislovity
  • first
  • for change
  • significance
  • value type (and POSITION operator)
  • select
  • group for
  • languish
  • Є NULL
  • Є NULL
  • connection - right, left, internal, external.

And also some small tricks of 1C language that you can use to optimize the text.

To improve queries, the 1C 8.2 system has been equipped with a special tool - the query console. You can get a description and enchant him by asking -.

Let's take a look at the most important and useful operators of 1C queries.

VIBRATE (SELECT)

In our 1C enterprise queries 8, any query starts with a keyword VIBRATE. Movi 1C does not have the UPDATE, DELETE, CREATE TABLE, INSERT constructs, whose manipulations are carried out in object technology. The purpose of this is more than the reading of the data.

For example:

VIBRATE
Current Dovidnik. Name
Z
Dovidnik.Nomenclature YAK Potochny Dovidnik

Fill the table with the names of the nomenclature.

Order by design VIBRATE You can sharpen your keywords FOR THE MIND, ALLOWED, RIZNI, PERSHI

ALLOWED— selects entries from the table, which have the rights of an in-line account manager.

RIZNI- means that the result will not be wasted in duplicate rows.

VIBIR (CASE)

This design is often underestimated by programmers. Example from wiki:

Potochny Dovidnik. Name,

KOLI Potochny Dovidnik.

"Service"

KINETS YAK VidNomenclature

Dovidnik.Nomenclature YAK Potochny Dovidnik

Butt turn the text value “Product” or “Service” in the “Type of Nomenclature” field.

DE (WHERE)

The design of the data is 1C, which allows you to add a selection to the data. Make sure that the system retrieves all data from the server, and then selects this parameter.

VIBRATE
Dovidnik.Name
Z
Potochny Dovidnik. Nomenclature YAK Potochny Dovidnik
DE Potochny Dovidnik. Service = TRUE

In applications, we select records that have the value of the “Service” attribute set to the “True” position. Whose application would be possible with such a mind:

"DE Posluga"

Essentially, we select rows in which the word “Truth” follows the keyword.

In the virazas you can vikoristuvat direct thoughts:

DE Code = "005215"

For the additional help of the “VALUE()” operator, in the minds of the vikorystvuvat the zoom to the value elements and rewrite the 1C entry:

DE TypeNomenclature = Value (Re-arrangement. Type Nomenclature. Product)

Significant hours can be designated as follows:

DE DateNadhodzhennya > DATETIME(2012,01,01):

Most often, the mind specifies the type of parameters that are transmitted to the request:

Watch 267 video lessons from 1C free of charge:

DE Nomenklatura group = & Nomenklatura group

The mind can be applied to the type of props, such as the warehouse type:

If you need to separate the selection from a list of values ​​or an array, you can do it like this:

DE Register Accumulation. Registrar B (&List of Documents for Selection)

The mind can be foldable, which consists of several minds:

DE DateNadhodzhennya > DATETIME(2012,01,01) I NomenclatureGroup=NomenclatureGroup I NOT Service

GROUP BY

The design of the 1C 8.2 queries is being analyzed to group the results.

For example:

VIBRATE
Reliability of ProductsServiceProducts.Product,
SUMA (Reliability of Goods and Services Goods. Quantity) YAK Quantity,
SUMA (Nursing GoodsPoslugGoods.Sum) YAK Suma
Z
Document.Product SustainabilityService.Products YAKProduct SustainabilityServiceProducts

GROUP BY
Reliability of ProductsServiceProducts.Product

This will cover all costs and expenses across the nomenclature.

Keyword cream SUMA You can use other aggregate functions: KILKIST, NUMBER OF SLAUGHTERS, MAXIMUM, MINIMUM, MIDDLE.

MAYUCHI (HAVING)

The design is something that is often forgotten about, but it is even more important that the korisna is so important. It allows you to specify a selection in the form of an aggregate function that cannot be specified in the structure DE.

Butt of the vikoristanny MAYUCHI at zapі 1C:

VIBRATE
Reliability of ProductsServiceProducts.Product,
SUMA (Reliability of Goods and Services Goods. Quantity) YAK Quantity,
SUMA (Nursing GoodsPoslugGoods.Sum) YAK Suma
Z
Document.Product SustainabilityService.Products YAKProduct SustainabilityServiceProducts

GROUP BY
Sourcing of Products Service Products Products

AMOUNT (Product Availability, Service Product. Quantity) > 5

So we will select a number of products, of which we found more than 5 pieces.

VALUE()

For example:

DE Bank = Value (Dovidnik. Banks. Empty Post)

DE ViewNomenclature = Value(Dovidnik.ViewNomenclature.Product)

DE TypeNomenclature=Value(Rearrangement.TypeNomenclature.Service)

TYPE at the request

The data type can be verified as follows: using the additional function TYPE() and TYPEVALUE() or using the additional logical operator SIZE.

VIRAZITY()

The Virasity operator in 1C queries serves to reconvert data types.

Syntax: VIRAZITY(<Выражение>YAK<Тип значения>)

Additionally, you can convert string values ​​to a date or a message to a row of data, and so on.

In practical terms, the Virazity() operator is often used to transform unbounded fields, because unbounded fields cannot be selected or grouped. If you don’t change such fields, you take away the penalty It is not possible to align fields of unmargined dowage and fields of non-marginal types.

VIBRATE
Contact Information.Object,
VIRAZITY(ContactInformation.Introduction YAK RYADKU(150)) YAK Podannya
Z
RegistryDovidok.Contact Information YAK Contact Information

GROUP BY
VIRAZITY(ContactInformation.Presentation YAK RYADKU(150)),
Contact Information.Object

Є NULL (ISNULL)

Add the correct function of your 1C queries, which verifies the values ​​in the record, and what is different NULL, This allows you to replace your value. It is most often used when separating virtual tables of surplus and turnover in order to receive NULL and set reasonable 0 (zero).

Є NULL (Donations before the month. FSS Benefit is stagnated, 0)

This function is used to write 1C Є NULL for each value and rotate zero to allow the correction to be deleted.

JOIN

There are 4 types of connections: LIVOE, RIGHT, OUTSIDE, INNER.

LEFT AND RIGHT CONNECTION

Joining vikorists for a connection between two tables behind the singing mind. Particularity when LIVOM Z'EDNANNI The one we take first shows the table in full and is linked to my other table. The fields of another table, which were connected to the mind, will be filled with values NULL.

Butt of the left connection at 1C:

Rotate the entire table and fill in the “Bank” field only in those places where you will be able to understand the “Counterparties.” Name = Banks. Naming". If your mind is not adjusted, the Bank field will be installed NULL.

USE RIGHTS for Movi 1C 8.3 absolutely similar LEFT CONNECTION, for one reason only: RIGHT CONNECTION The “head” table is a friend, not a first.

OUTSIDE Z'EDNANNYA

OUTSIDE Z'EDNANNYA It splits between the left and the right so that you can display all records from the two tables, combining only those that can be combined behind the sink.

For example:

OUTSIDE Z'EDNANNYA
Dovidnik. Banks YAK Banks

PZ

The language is asked, perhaps offended, in the tables, or behind the visconed mind of the Consolidation of records. When changing from left/right connection, NULL may appear in two fields.

INTERNAL CONNECTION

INTERNAL CONNECTION It is especially important to display those records that could be found behind the given mind.

For example:

Z
Dovdnik.Counterparties YAK Clients

INTERNAL CONNECTION
Dovidnik. Banks YAK Banks

PZ
Clients. Name = Banks. Name

This will probably cover more than one row, in which the bank and the counterparty have the same name.

Visnovok

There is only a small part of the syntax of the words in 1C 8, but later I will try to look at the details of the report and show you a lot more!

43
NULL – daily values. Don't get lost in zero values! NULL - not a number, not equal to the blank, empty, unsigned. NULL is a type-forming value. The main type is NULL and a single value type. NULL... 26
To formulate and edit queries to the database table on the 1C platform, a special programming object is needed. An object is created by clicking the New Request construction. Wash it down manually... 18
The article points out some useful tips when working with 1C v.8.2 queries, as well as information that is not so good in my opinion. I won’t give up a new description of my questions, but I want to go back to... 13
PODIBNO - Operator for reversing a row to match the pattern. Analogous to LIKE in SQL. The operator also allows you to equalize the value of the expression specified in the right hand. Significant Virus...

Respect! Here is a version of the lesson, the materials of which may be incorrect.

Go to the site as a student

Log out as a student to deny access to school materials

Language of 1C 8.3 for novice programmers: functions and operators for working with types (VALUE TYPE, TYPE, SIZE, NULL, VIRAZITY)

It is clear that every attribute (power, field) of a witness, document or other application object has its own type. This type can be seen in the configurator:

Our requests have a whole class of functions and operators to work with types of details. Let's take a look at them.

VALUE TYPE function

This function takes one parameter (value) and rotates its type. For the details described in the picture Gusto witness Hedgehog turn like this:

Now let's take a look at the props Vidminna sign at the witness's Mista:

You can see that this attribute can be one of several types: Row, Dovidnik.Smaki, Dovidnik.. This type of details is called FOLDING.

If we try to fill in the values ​​of such details in the 1C:Enterprise mode, the system will supply us with the type of value to be entered:

And after our selection, allow us to enter the value of the selected type.

In this manner, the elements of the witness are of the same type ( Dovidnik.) you can save in the same details ( Vidminna sign) meanings of different types (Row, Colori or Smaki).

You can go there by clicking on the elements of the app Mista in 1C mode: Entrepreneurship. You are reading the complete version of the lesson, full lessons.

Here the meaning of the prominent sign is an element of the indicator Smaki:

Here next to each other:

And here we started with an element of the witness colori:

The axis of possibility opens up to us the warehouse type of data!

Tsikavo, how the function works TINANCY on details VisibleElement, what is the warehouse data type:

It’s really cool. Let's take a closer look at the skin row.

Type of value of the prominent sign for the element Russia Dorevnyaya NULL. We are starting to stick to this type. Values ​​of this type are used inclusively for calculating the daily value when working with the database.

So, even the element Russia is a group, and not an individual element of the speaker Mista so no one has a field Vidminna sign. And the type has a daily meaning, as we have read above, from now on it is ancient NULL.

Type of value of prominent sign for Perm region Smaki. So, even the significant prominent characters are filled in at the base for the place Perm sent to the Adviser element Smaki.

For Krasnoyarsk, the type of signs is older colori, because the values ​​are collected in the database and sent to the indicator element colori.

For Voronezh the type of signs is old Row, because the values ​​are entered in the database in the original row.

India is a new group, so it is of no importance. And the type of the daily meaning, as we remember, is ancient NULL.

And on the right is the axis of the choma. When you get to the editor element Mista s named Sao Paulo, then guess what field Vidminna sign not at all protected. It's empty. A All unfilled fields of the warehouse type may have special meanings NOT VISIBLE.

Z NOT VISIBLE We are also moving forward. Significance NOT VISIBLE It becomes stagnant when it is necessary to substitute empty values ​​that do not correspond to the desired other type. This is exactly our situation. And the type of value NOT VISIBLE As you already melodiously guessed the ancient NULL.

Function TYPE

It accepts only one parameter - the name of a primitive type ( ROW, NUMBER, DATE, Bulova), or the name of the table, the type of message you need to maintain.

The result of this construction will be the value of the type for the assigned type.

Sounds vague, doesn't it?

Let's take a look at the construction of this structure and everything will immediately fall into place.

Please tell us we need to select all the records of the witness Mista, some warehouse details Vidminna sign May have meaning to type ROW:

Now let's select all the records that are important to the details Vidminna signє sent on the elements of the editor colori(Table Dovidnik.):

Access

As you remember, these are the elements of the witness Mista do not touch the props Vidminna sign. Function TINANCY for such elements it looks like NULL.

How can you select such elements in a drink? For which a special logical operator has been transferred Є NULL(Don't get confused with the function Є NULL, which we will look at below). You are reading the complete version of the lesson, full lessons.

Axis butt yogo wiki:

Miraculous. Ale you noted that there is no element of Sao Paulo here, the type of value of the details Vidminna sign what have you seen NULL. Why did this happen?

And on the right is the situation for groups (Russia, India, Brazil), for those who need to fill in the details Vidminna sign It’s impossible in principle, they don’t have any fragments of it at all, the situation arises for the element of Sao Paulo, for which details can be filled in, but it’s simply not filled in, and one thing, as we remember, is of special importance NOT VISIBLE.

To select all entries that contain details Vidminna sign present, rather than filling in the traces, use another construction:

Ale leveling with UNVISIBLE identification of empty (unreplenished) details applies to warehouse types.

Before speaking, the logical operator Є NULL has an enumeration form that looks like this:

Logical operator POSILANNYA

For example, let's choose from the agent Mista Remove those records that have the meaning of the stored details Vidminna signє sent to the document element Smaki:

As you remember, these ideas could be believed by vikoryists TINANCYі TYPE:

NULL function

The function is intended to replace a value NULL Another meaning.

We remember what is important NULL It turns around in this case, because there are no requisites (field, power) asked for.

Yak, for example, props Vidminna sign for groups of advisers Mista:

Function Є NULL will help us to derive other meanings from this phenomenon, since its meaning is related NULL. You are reading the complete version of the lesson, full lessons. Let someone else have a row of “There are no such props!”:

Find out what is the first parameter of the function Є NULL doesn't compare NULL, then it turns around. If the value is NULL, then another parameter is rotated.

Function VIRASITI

This function is intended only for fields that are of the warehouse type. The main butt of such a field is power Vidminna sign in the elements of the editor Mista.

As we remember, storage fields can be one of several types specified in the configurator.

For field Vidminna sign such valid types є ROW, Dovidnik.і Dovidnik.Smaki.

Sometimes there is a need to bring the values ​​of the folded field to the correct type.

Let's set all the fields Vidminna sign up to type Dovidnik.

The result has all the values ​​of elements, such as small type Dovidnik. lost their reserves and appeared to be brought to the designated type. All meanings of other types ( ROW, Dovidnik.Smaki) now they have become equals NULL. Who has the specificity of directing the type for an additional function? VIRAZITY.

You can direct the type to either the primitive type ( Bulova, NUMBER, ROW, DATE) or to the posible type. You are reading the complete version of the lesson, full lessons. Any type, which you are afraid to bring, can easily enter the list of types for a given warehouse field, otherwise the system will show a problem.

Take the test

Print the test

1. Choose the right firmness

2. Details that contain the values ​​of one of several types are called

3. To assign the type of value to the attribute, use the function

4. Unrequired details of the folded type may have meaning