Calling the manually typed Constants value into the catalog item form.

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Aug 13, 2022
Company: ComPhase Bilgi Teknolojileri Ltd. Şti.

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?

 
#2
People who like this:0Yes/0No
Active user
Rating: 8
Joined: May 21, 2023
Company:

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

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Aug 13, 2022
Company: ComPhase Bilgi Teknolojileri Ltd. Şti.

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

 
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.