ChoiceForm select

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Apr 10, 2020
Company: HerSüreçYazılım

Hello,
I want to select the records in the ChoiceForm form with the check box (Picture-1). How can I do it?

 
#2
People who like this:0Yes/0No
Administrator
Rating: 23
Joined: Oct 3, 2019
Company:

Hello Ertuğrul,

the 1C platform allows user to select multiple items without using checkboxes. That is, the user can always select several values in the selection form. You can also use the Ctrl and Shift key combinations to select (screenshot 1).

But after multiple choices, the programmer needs to process the received data. The code will look like this:

Code
&AtClient
Procedure Fillling(Command)
   
   notify = New NotifyDescription("FilllingAtServer",ThisForm);
   
   selectionParameters = New Structure;
   selectionParameters.Insert("ChoiceMode",       True);
   selectionParameters.Insert("MultipleChoice",    True);
   
   OpenForm("Catalog.Catalog1.ChoiceForm",selectionParameters,ThisForm,,,,notify,FormWindowOpeningMode.LockOwnerWindow);
   
EndProcedure

&AtServer
Procedure FilllingAtServer(result, parameters) Export 
   
   Object.TabularSection1.Clear();
   
   For Each curElement In result Do 
      
      newLine = Object.TabularSection1.Add();
      
      newLine.Attribute1 = curElement;
      
   EndDo;
   
EndProcedure


For your convenience, have attached dt-file that implements this example.

If you want to implement the selection exactly by checkboxes, then this is also possible, but will more complex implementation.

Download 1.png (7.51 KB)
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.