M
M
Mag1str2022-02-25 16:07:08
1C
Mag1str, 2022-02-25 16:07:08

Which event to choose?

Hello.
I need to make the "Number of Places" field available when the item "Type" of the Nomenclature = Stock. And even if the Reserve, then the Quantity of Places props must be filled in. Everything is in the Tabular Section.

Tell me, do you need to select the event StartSelecting the QuantityPlaces attribute or WhenUsing the Nomenclature attribute?
6218d4bec446e254518421.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kinash, 2022-02-25
@Dementor

Look wider. If you have a tabular part, it means that you have rows. Each line can contain an item with a different type. Users can switch between lines.
1) "When using the attribute Nomenclature" - this will work for a specific line that you are editing, and then you change the line and the behavior will not change on another type. Not to mention the scenario that you write down a document, close it, open it and want to change the number of places.
2) "Begin to Select the attribute Number of Seats" is already better, since there are no disadvantages of the first option, but I strongly doubt that someone will enter the number of seats through the selection using a calculator.
The most optimal solution would be with the help of the OnActivateCell event handler for the form table - check what kind of cell is activated, and if it is "Number of places", and in the line there is an item of the Stock type, then allow entering a number, otherwise ViewOnly = True.
PS Another Anton Anton interestingly suggested through conditional formatting, but the condition must be explicitly on the form - you can't check for subordinate details. You can add a hidden attribute Type to the table and fill it in when opening the form or when changing the item. And then put the design ViewOnly=True on the table, if the row has Type=Stock.

A
Anton Anton, 2022-02-25
@Fragster

In the OnCreateAtServer form, set the conditional appearance to ViewOnly and MarkUnfilled, in the object module in the CheckFill event to manually check lines, set failures, and add errors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question