Take parameter by selected value

For students who study 1C Senior course.

#1
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Hello,

I have one document and one catalog.I want that When I select a product in document,parameters of product must be taken in the catalog.I have writed some code but wrong.How can I do this?

MalzemeBilgiKartı=ProductInformation Catalog
MalzemeGirişi=ProductEnter Document
StokKodu=Stock code

Download Codes.PNG (25.11 KB)
Edited: Mesut Kahraman - Dec 16, 2020 05:44 PM
 
#2
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

I have added dump of program.

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

-In your query you tried to somehow connect the document MalzemeGirisi with the catalog MalzemeBilgiKarti. We indeed have to somehow connect the document with the catalog, but this connection will be throgh the use of parameter StokKod.Ref in the query.
-In the module of the form of the document, we write a function which from the server collects the information associated with the Current StokKod that the user just have chosen (so the function takes the current StokKod as parameter which will be used in the query), and returns the received data to the client in the form of a Structure.
-Afterwards, on the client we fill in the current line of the tabular section with the data from the Structure which the function have returned (from server  to client).
Please see the attached screenshot and the solved .dt file.
If you have any more questions about the matter, feel free to ask.

 
#4
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Thank you very much!

 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

Thank you!

 
#6
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

I also want to do another thing like this.There are two documents ProductDetail(MalzemeGirişiAyrıntıları) and Basketing(Sepetleme).In Basketing select reference of ProductDetail and show datas of ProductDetail in Basketing.I have writen some codes but it is not true.Can you help me please?

Edited: Mesut Kahraman - Dec 22, 2020 02:49 PM
 
#7
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

I have added the dump.

 
#8
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

Hello! Sure i am going to answer it today night.

 
#9
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Ok.It is very good that I send you dump and you solve problems.

I have changed something,it is new dump in the attachment.

Edited: Mesut Kahraman - Dec 22, 2020 06:24 PM
 
#10
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

Dear Mesut,
thank you, I am happy if I could be of any help.
-Please note that in your previous question, you were dealing with  a certain line (the line which was currently active (highlighted) in the client) in the tabular section of the document. Since at the server we cannot know (and do not have access to) which line of the tabular section the user has currently activated, we received the data from the server and filled in the current data (active line) of the tabular section at the client.
-However, in your second question please note that there are no highlighted lines at the tabular section, that means we are not dealing with CurrentData. This time we want to fill out the tabular section as a whole. Since this time we do not have business with which line is the current line in the tabular section and the result of the query (of ValueTable data type) is not available at the client, we fill out the tabular section at the server.

If you need more elaboration, or have other questions about that matter, please let me know. I have attached a screenshot and the solved dt file.

 
#11
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Ok.Thank you.

One more thing, I write a question about exchange rate and xml in this link(https://1c-dn.com/forum/forum11/topic2381/#message15630?result=reply#message15630).Do you have any example about it or can you help me?

Edited: Mesut Kahraman - Dec 23, 2020 02:03 PM
 
#12
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Hello Mr.Saygın,

I have one more question.I select a ProductDetail(MalzemeGirişiAyrıntıları) in Basketing document(Sepetleme) and it shows just aggreed products in tabular section.When I save the document,go ProductDetail document and set true the EnterProcess(ProseseGirdi) value by ProductNo(MalzemeNo) in tabular section,not all products.I can not do this,can you help me please.

The dump is on attachment.

Edited: Mesut Kahraman - Dec 24, 2020 03:51 PM
 
#13
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

hello Mesut. I have read your questions, I will provide solutions tomorrow till evening/night. thank you.

 
#14
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Ok,I have added dump.In the dump there are a lot things about first and second question.There is also dataprocessor.

 
#15
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

Mesut, regarding the downloading of currency exchange rates from the bank to an information register in the database, it can be done with a data processor. I have done similar thing before, the operator downloaded an xml file from the bank, then ran the data processor, data processor read the xml file and created bank documents (receiving and sending of cash from bank account). Similar data processor can be constructed for exchange rates too. But first, you have to receive from the bank an example .xml file with the exchange rate data, and a document giving instructions on how to interpret (read) the dta from the .xml file. I do not know yet how to directly connect to the bank and download the data, bank should have instructions on this too. If you can provide me with this info, i can write a data processor for you.

 
#16
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

About the last question:
1-I select a ProductDetail(MalzemeGirişiAyrıntıları) in Basketing document(Sepetleme) and it shows just aggreed products in tabular section. (yes, you have already done it correctly)
2-When I save the document,go ProductDetail document and set true the EnterProcess(ProseseGirdi) value by ProductNo(MalzemeNo) in tabular section,not all products.I can not do this,can you help me please. (this second part i couldn't understand anything. Could you please ask it in Turkish?)  ikinci kismi Tukce sorabilir misin?

 
#17
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Tabi.
Sepetleme formunda kaydet dediğim zaman sepetlemede hangi ürünler varsa onların malzeme no'suna göre malzeme giriş ayrıntılarına gidecek ve malzemegirişiayrıntılarında o ürünlerin "ProseseGirdi" kısımlarını True yapacak.

Bunu yaptırmaya çalıştım bir mantık kurdum ama olmadı.Yapabilirseniz çok iyi olur.

Edited: Mesut Kahraman - Dec 26, 2020 12:23 AM
 
#18
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Döviz Kurları için birine sorduğumda bana şöyle cevap verdi;

Sizin verdiğiniz adresten alınan veri bir RSS akışı. XML in içerisinde direkt kuru alabileceğiniz alanlar yok. Kur bilgisi bu XML ‘in “Description” tagı içinde HTML string olarak bulunuyor. Sizin bu XML in içerisindeki aldığınız HTML Stringi parse etmeniz gerekecek.

adres=https://www.nbg.gov.ge/rss.php

 
#19
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

Hi Mesut!
Please see the corrected .dt file and the screenshot. tomorrow night i will try to send you another dt file and explanations on solving this by using a more suitable, correct method (by adding an accumulations register on which the both documents will do records).

 
#20
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Dec 2, 2020
Company:

regarding the exchange rates, i found such a tag in the linked document [td]8.9028[/td], it looks like an exchange right? bank should provide instructions on from which part of the file we need to get the needed exchange rate. (Description” tagı içinde HTML string olarak bulunuyor. O sttingon neresinde oiste onu bildirmeleri lazim. Diyelim o stringin 50. karakteri ile 57. karakteri arasi excahnge rate dir gibi.

 
#21
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Thank you for your answers.

I am going to write an answer about exchange rates.

 
#22
People who like this:0Yes/0No
Interested
Rating: 10
Joined: Sep 30, 2020
Company: Nortek Bilişim

Hello Mr.Saygın,

I have asked Georgia Bank how to exchange rates or is there any document,they said that you can contact ProService:  https://www.proservice.ge/. I have also asked how to take rates,they gave me this link(https://nbg.gov.ge/api.html).Can you take rates using this link and information?

Additionaly,Have you an example about XML,XDTO,HttpService,WebService etc.If you have these,can you send me?
I want to write codes using the examples.

 
Subscribe
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.