Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > ChoiceForm select

Forum

Search UsersRules
ChoiceForm select
#1
Active user
Points:: 0
Joined:: Apr 10, 2020

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

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

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.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.