This topic is locked

Master-Detail relationship

6/7/2019 3:41:55 PM
PHPRunner General questions
ruzgarajans author

Hi,

https://xlinesoft.com/phprunner/docs/master-detail_relationship.htm
how to hide or show the detail table by field value?
image 1:

https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=26476&image=1&table=forumtopics





İmage2:

https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=26476&image=3&table=forumtopics


ruzgarajans author 6/8/2019

it should work,
Fatal error: Call to a member function showitem() on a non-object in
Is there a different solution?
php snippet



//********** Check if specific record exists ************

global $conn;

$strSQLExists = "select * from yerleske_grubu_pol_ekle where pol_id='60'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

$pageObject->hideitem("ftrverileri_2");
// if record exists do something

}

else

{

$pageObject->showitem("ftrverileri_2");

// if dont exist do something else

}
H
Hd_Mersintarim 6/8/2019



it should work,
Fatal error: Call to a member function showitem() on a non-object in
Is there a different solution?
php snippet



//********** Check if specific record exists ************

global $conn;

$strSQLExists = "select * from yerleske_grubu_pol_ekle where pol_id='60'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

$pageObject->hideitem("ftrverileri_2");
// if record exists do something

}

else

{

$pageObject->showitem("ftrverileri_2");

// if dont exist do something else

}



events on before

if ...

$xt->assign("ftrverileri_2_tabfieldblock",FALSE);

ruzgarajans author 6/8/2019

this program is very powerful ..
there should be another method...

lefty 6/9/2019



this program is very powerful ..
there should be another method...


All your screenshots are unreachable? What version of PHPrunner and build would also help .

ruzgarajans author 6/9/2019



All your screenshots are unreachable? What version of PHPrunner and build would also help .



hi,

thank you very much.

PHPRunner 10.0

screen shot direkt link:
image:1 https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87931&image=1&table=forumreplies
image 2: https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87931&image=2&table=forumreplies
a seller chooses product group (pol_id) (tv, mobile phone, refrigerator, furniture)

To add products you need a detailed table.130 * have different detail table.
how experts do it?

lefty 6/9/2019



hi,

thank you very much.

PHPRunner 10.0

screen shot direkt link:
image:1
a seller chooses product group (pol_id) (tv, mobile phone, refrigerator, furniture)

To add products you need a detailed table.130 * have different detail table.
how experts do it?


Is this what your are looking for .
Click Here[size="2"]. Or here for full master/details link. Or here is a start based on JavacriptAPI. Here What I think you are looking for. [/size]
[size="2"]Screenshots say forbidden . Use Photobucke[/size]t it's free trial . Don't quite get it without screenshot , but I think you want to hide value based on category , but to whom or what condition????? Based on your code that I see above it would show regardless of the condition.

lefty 6/9/2019



photobuckhet:

album: https://photos.app.g...QE3uvecVLojS5F6

image:
prntscreen direct url:
image 1:
https://prntscr.com/nzhj7d

image 2: https://prntscr.com/nzhj03
google foto:

https://photos.app.g...QE3uvecVLojS5F6
thank you very much....


Okay , The code you show is showing incorrect tables . Not sure if you see that also showitem in your code I have not seen before except .net but I guess should be universal in JsriptAPI .. To save time look at this javascript on load . HERE
If pol_id=60 show details from table ftr_verileri , else if pol_id = 50 show details from ftr_verileri2 . Is this correct ?
You have one master ( yerleske_grubu_pol_ekle with relationship Pol_id. Details 1 . ( ftr_verilerii ) Details 2. ( ftr_verileri2 ) . You must specify this in the master details relationship so you should have two lines when you click on these lines one master 2 details is that correct?? .
Master / Details are either one to one or / one to many . If you have different categories your structure needs to be changed to filter the categories instead. In my opinion. I do know what you are looking for I think. Just waiting for your response to above.
See Updated Image

ruzgarajans author 6/9/2019

I can not speak well, but, you understand me thank you.
If pol_id=60 show details from table ftr_verileri , else if pol_id = 50 show details from ftr_verileri2 . Is this correct ? Yes true.
Master / Details are either one to one or / one to many . If you have different categories your structure needs to be changed to filter the categories instead. In my opinion. I do know what you are looking for I think. Just waiting for your response to above.
looks fine

This may be the right method

lefty 6/9/2019



I can not speak well, but, you understand me thank you.
If pol_id=60 show details from table ftr_verileri , else if pol_id = 50 show details from ftr_verileri2 . Is this correct ? Yes true.
Master / Details are either one to one or / one to many . If you have different categories your structure needs to be changed to filter the categories instead. In my opinion. I do know what you are looking for I think. Just waiting for your response to above.
looks fine

This may be the right method


ruzgarajans
Yes hideitem is part of the new Pageobject but I have only seen it in the documentation used with a button although , . You may want to contact support and open a ticket to get the right method.

What I would do is have two details one for 50 one for 60 . If there are other categories in them like a bunch of sub catagories , then I would change the structure to have the user on the left side of the list page be able to choose categories instead of using master and details. Just my opinion though.

ruzgarajans author 6/9/2019



ruzgarajans
Yes hideitem is part of the new Pageobject but I have only seen it in the documentation used with a button although , . You may want to contact support and open a ticket to get the right method.

What I would do is have two details one for 50 one for 60 . If there are other categories in them like a bunch of sub catagories , then I would change the structure to have the user on the left side of the list page be able to choose categories instead of using master and details. Just my opinion though.


yes, I used it.
I think I should work on the button. The right method can be make buttons <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87939&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

ruzgarajans author 6/9/2019



ruzgarajans
Yes hideitem is part of the new Pageobject but I have only seen it in the documentation used with a button although , . You may want to contact support and open a ticket to get the right method.

What I would do is have two details one for 50 one for 60 . If there are other categories in them like a bunch of sub catagories , then I would change the structure to have the user on the left side of the list page be able to choose categories instead of using master and details. Just my opinion though.


Client After

rowData.fields['pol_id'].css('border', '1px solid red');

window.popup = Runner.displayPopup({

url:result["detail_page_link"],

width: 700,

height: 700,

header: 'Add '
});


server:

$record = $button->getCurrentRecord();
$result["detail_page_link"] = $record["detail_page_link"];

// Put your code here.


I must write the link addresses in the table

So how do I retrieve user information from the list?


http://prntscr.com/nzjobv
and Adding buttons is a laborious task.. because Event codes need to be written in 150 detail tables ..<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87941&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />

lefty 6/10/2019



Client After

rowData.fields['pol_id'].css('border', '1px solid red');

window.popup = Runner.displayPopup({

url:result["detail_page_link"],

width: 700,

height: 700,

header: 'Add '
});


server:

$record = $button->getCurrentRecord();
$result["detail_page_link"] = $record["detail_page_link"];

// Put your code here.


I must write the link addresses in the table

So how do I retrieve user information from the list?


http://prntscr.com/nzjobv
and Adding buttons is a laborious task.. because Event codes need to be written in 150 detail tables ..<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=87947&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />


I was suggesting adding a filter to the list page with sub categories Instead / and or 2 details ( show individual Links ) from master. . Although It won't hide until you filter your choices. This is a little easier way of getting this resolved.

I guess if you contact support they can give you the hiteitem method as I have not used the new API in new version 10.1. I think that is just to hide or show button not values.???

ruzgarajans author 6/13/2019

support said; they will give me a solution if I get paid support..

I don't have a paid support package...
I must continue to investigate...