This topic is locked

Error [Unable to test]

8/19/2017 11:28:33 PM
PHPRunner General questions
Z
Zerobaka author

I need to make drop-down dependent, so i pick a field called "kode" that is presents in both parent-filter table,

obviously i made the field as a link for both table.
But when i click the [Test it] button:
Unable to test

Setup "kode" as Lookup wizard first.
I can't find any explanation from the help file for this error.
Any idea, folks?

L
Lawrence Nyaga 8/20/2017



I need to make drop-down dependent, so i pick a field called "kode" that is presents in both parent-filter table,

obviously i made the field as a link for both table.
But when i click the [Test it] button:
Unable to test

Setup "kode" as Lookup wizard first.
I can't find any explanation from the help file for this error.
Any idea, folks?


you need to provide more information maybe screen shots or code maybe both.

it could be a number of things if you did everything right maybe your query takes too long to run.

Z
Zerobaka author 8/20/2017



you need to provide more information maybe screen shots or code maybe both.

it could be a number of things if you did everything right maybe your query takes too long to run.


Well, this is the parent table structure:



TABLE `akta` (

`id_akta` INT(11) NOT NULL AUTO_INCREMENT,

`id_tagihan` INT(11) NULL DEFAULT NULL,

`id_items` INT(11) NOT NULL,

`no_urut` SMALLINT(6) NOT NULL,

`no_akta` SMALLINT(6) NOT NULL,

`tgl_akta` DATE NOT NULL,

`id_jenis_produk` INT(11) NOT NULL,

`nama_judul` VARCHAR(250) NULL DEFAULT NULL,

`id_notaris` INT(11) NOT NULL,

`id_bank_akad` INT(11) NOT NULL,

`nama_pihak` VARCHAR(150) NOT NULL,

`tgl_buat` DATE NOT NULL,

`kode` VARCHAR(15) NOT NULL,

`id_user` INT(11) NOT NULL,

PRIMARY KEY (`id_akta`)

)


And this is the filter table structure:



TABLE `items` (

`id_items` INT(11) NOT NULL AUTO_INCREMENT,

`id_jenis_invoice` INT(11) NOT NULL,

`no_invoice` VARCHAR(18) NOT NULL,

`indeks` TINYINT(4) NOT NULL,

`detail` VARCHAR(300) NOT NULL,

`harga` BIGINT(20) NOT NULL,

`tgl_buat` DATE NOT NULL,

`kode` VARCHAR(15) NOT NULL,

`id_user` INT(11) NOT NULL,

PRIMARY KEY (`id_items`)

)


And this is the screen shot of look-up wizard of the field 'id_items' at the akta table,

where the error happened:


Btw, although 'kode' are VARCHAR, but the content are number digits only.

And... that's it. Any idea?

Thanks anyway for any response, dudes

Best regards

Sergey Kornilov admin 8/21/2017

You need to setup "kode" field as Lookup wizard first.

Z
Zerobaka author 8/21/2017



You need to setup "kode" field as Lookup wizard first.


More detail of explanation please, I wrote this post exactly because I don't understand the meaning of that line.

I share the structure of the parent-filter tables, and the look-up wizard screen.

Anyone?

H
Hertz2P 8/21/2017



More detail of explanation please, I wrote this post exactly because I don't understand the meaning of that line.

I share the structure of the parent-filter tables, and the look-up wizard screen.

Anyone?


Just as Sergey said, you need to set a lookup wizard for 'kode' first. In other words a dependent dropdown depends on a prior selection to narrow the results. You need to first setup a lookup wizard to first choose data from the 'kode' field, then make this lookup wizard dependent on its results. If you still don't get it, watch this tutorial: https://www.xlinesoft.com/tutorials/dependentdropdowns.htm

Z
Zerobaka author 8/23/2017



Just as Sergey said, you need to set a lookup wizard for 'kode' first. In other words a dependent dropdown depends on a prior selection to narrow the results. You need to first setup a lookup wizard to first choose data from the 'kode' field, then make this lookup wizard dependent on its results. If you still don't get it, watch this tutorial: https://www.xlinesoft.com/tutorials/dependentdropdowns.htm


I see, it seems i cannot use 'kode' for it is not a key field.

Then, how about using the 'WHERE' input box? Is it possible to use another table's field in it?

Thanks for the revelations

Sergey Kornilov admin 8/23/2017

First, you can and should setup "kode" as a Lookup Wizard. It doesn't matter that this field is not a key field.
Second, you can use SQL variables in WHERE clause of Lookup Wizard field to implement the same thing. See examples at the end of this article:

https://xlinesoft.com/blog/2017/06/16/version-9-8-of-phprunner-asprunnerpro-and-asprunner-net/