Desktop version

Main > Forum > Learning > 1C Senior Developer Course > Take parameter by selected value

Forum

Search UsersRules
Take parameter by selected value
#1
Interested
Points:: 0
Joined:: Sep 30, 2020

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

Profile
#2
Interested
Points:: 0
Joined:: Sep 30, 2020

I have added dump of program.

Profile
#3
Just came
Points:: 0
Joined:: Dec 2, 2020

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

Profile
#4
Interested
Points:: 0
Joined:: Sep 30, 2020

Thank you very much!

Profile
#5
Just came
Points:: 0
Joined:: Dec 2, 2020

Thank you!

Profile
#6
Interested
Points:: 0
Joined:: Sep 30, 2020

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?

Profile
#7
Interested
Points:: 0
Joined:: Sep 30, 2020

I have added the dump.

Profile
#8
Just came
Points:: 0
Joined:: Dec 2, 2020

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

Profile
#9
Interested
Points:: 0
Joined:: Sep 30, 2020

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.

Profile
#10
Just came
Points:: 0
Joined:: Dec 2, 2020

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.

Profile
#11
Interested
Points:: 0
Joined:: Sep 30, 2020

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?

Profile
#12
Interested
Points:: 0
Joined:: Sep 30, 2020

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.

Profile
#13
Just came
Points:: 0
Joined:: Dec 2, 2020

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

Profile
#14
Interested
Points:: 0
Joined:: Sep 30, 2020

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

Profile
#15
Just came
Points:: 0
Joined:: Dec 2, 2020

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.

Profile
#16
Just came
Points:: 0
Joined:: Dec 2, 2020

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?

Profile
#17
Interested
Points:: 0
Joined:: Sep 30, 2020

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.

Profile
#18
Interested
Points:: 0
Joined:: Sep 30, 2020

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

Profile
#19
Just came
Points:: 0
Joined:: Dec 2, 2020

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

Profile
#20
Just came
Points:: 0
Joined:: Dec 2, 2020

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.

Profile
#21
Interested
Points:: 0
Joined:: Sep 30, 2020

Thank you for your answers.

I am going to write an answer about exchange rates.

Profile
#22
Interested
Points:: 0
Joined:: Sep 30, 2020

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.

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.