Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Dynamically assign form element type

Forum

Search UsersRules
Dynamically assign form element type
#1
Active user
Points:: 0
Joined:: May 21, 2023

I have a form element which can be of a composite data type or AnyRef type. The type of this form element depends on selected value of another form element. Is it possible in OnChange event handler procedure for form element which I select manually to assign a specific data type for the form element which now has a composite data type or AnyRef type?

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

Hello Peter Cross,

you can use a composite data type for this attribute (scr_1) and process the OnChange event as follows (scr_2).

As a result, the attribute will consistently take the type of value you need

Profile
#3
Active user
Points:: 0
Joined:: May 21, 2023

In my case Attribute1 has type Enumeration and Brands, Products and Shops are combined into one element of composite type which can be one of CatalogRef.Brands, CatalogRef.Products or CatalogRef.Shops type. And Attribute1 should go first on the form.

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.