Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Calling the manually typed Constants value into the catalog item form.

Forum

Search UsersRules
Calling the manually typed Constants value into the catalog item form.
#1
Just came
Points:: 0
Joined:: Aug 13, 2022

I added some constants values to the extension I created.
I created a new catalog.
I created a new item form in this catalog.
I want to do a math operation using the constants value I have created.
Catalog Attributes are as follows

"Value1" Number

"Total" Number

What I want to do is as follows

Sum = My Constatns value + Value1

So it's a very simple math operation, but I want to define my constants value from the tools form I will create myself.

I continue.

I created a new attribute in the form right window and edited it as constants set. I placed the corresponding Constants value inside the form.

I added OnChange event to my Value1 and Total fields. I wrote the relevant codes. If I use the "Value2" catalog attribute instead of my Constants value, my action happens. After this stage, what should I do to use my Constants value instead of "Value2"?

I know I have to do this with a command like Constatns Get() but I couldn't find a solution.

Please can you help me?

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

To get your constant value use Constants.<YourConstantName>.Get() and it should work.

Profile
#3
Just came
Points:: 0
Joined:: Aug 13, 2022

Peter Cross,
Peter Thank you very much, I have completed the process.

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.