Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#829368
Hi guys,
i am encountering a problem that i cant solve it no way! so i am going to describe it from the start

i have made a connection with my sql database as below:
Image
and my database table is as below:
Image
i have a dynaform with two textbox, one of them is independent field and the other is dependent field
my purpose is to enter an id in independent field and give the kala (field name in my database) value in dependent field.
in dependent field i create a database connection as below:
Image
then in sql editor i wrote the below code:
Image
when i open the dynaform and start typing id in independent field nothing happen in dependent field!!
do you know what is the problem??
#829372
kirkwg wrote: Mon Jul 19, 2021 8:23 am Nothing happen, it was because when the form loading,
the @@textVar001 is empty, so nothing can be retrieved from DB??
As it is mentioned in this wiki article:
https://wiki.processmaker.com/3.1/Dependent_Fields
if we have dependent and independent fields in our form, when the form is loaded we can retrieve data from database based on another field value. but mine does not work!
#829374
kirkwg wrote: Mon Jul 19, 2021 8:42 am In the Example of the link, when the RefNumber is a dropdown, it will trigger the SQL for your dependent textbox.

You can easily test it to change textVar001 into to a Dropdown Control instead of Textbox control ^^
i did it but it still does not work!!
please also see this video:
https://bit.ly/36KiNbp
#829376
kirkwg wrote: Mon Jul 19, 2021 9:12 am In your video, Suggest control works, when you select a value then it fills in the goods and reason.

It should work even if using Dropdown, why you said not working?
Finally i did it!!!!!!! :D :D :D
the answer is we should use @# in sql editor for example:
SELECT [Goods], Goods FROM [PowerBI].[dbo].[goods_tbl] where id = @#dropdownVar004
it does not work with @@
#829377
Congrate you!

As long as the concept is clear, then the direction is right, the chance to get what you want.

Even the textVar001 if using textbox, then you can do it but by providing your own trigger instead of the system providing the trigger for you. Of course, this is another higher level you want to achieve by coding. Cheers ..

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]