This topic is locked

Trying to Link Job_No to details Page

8/29/2017 6:29:43 AM
PHPRunner General questions
S
swanside author

OK. Sory about this, Will try again.

I have this in a custom field

if ($value=="DTD") $value = "<a target=_blank href=\"LiveImports_add.php?editid1=".$data["Job_No"]."\">".$value."</a>";






the idea is the engineer will click on the letters DTD and it will open a Add Page



It will open the URL, but it will not insert the Job_No into teh Job_No field.

As can see the top job was selected as it has a Job_No of 1024462. I can click on Select and browse to teh job that way, but I need to make it more automated


lefty 8/29/2017



OK. Sory about this, Will try again.

I have this in a custom field

if ($value=="DTD") $value = "<a target=_blank href=\"LiveImports_add.php?editid1=".$data["Job_No"]."\">".$value."</a>";






the idea is the engineer will click on the letters DTD and it will open a Add Page



It will open the URL, but it will not insert the Job_No into teh Job_No field.

As can see the top job was selected as it has a Job_No of 1024462. I can click on Select and browse to teh job that way, but I need to make it more automated




Try making the default value of Job_No
$_GET["Job_No"] on the Live Imports add page, Then it should fill the job_no , but not sure if it works with list page by search. I have been successfull by using it with edit as ajax lookup and dropdown lookup. Try testing it that way if it does not work with list page search. Then you'll know it's list page search that it does not work with . Haven't tested with list page by search nor with an if statement.
This is an example of How I do the same thing below to fill add page in another table with a link in edit as custom from another view but not with details table , but should still work the same .
$value ="<a href='Book_Display1_add.php?fldcategory=".$data["fldcategory"]."&fldavail=".$data["Pos"]."'>BOOK HERE</a>";
In my case I am actually filling two fields in the other table or view , So I have to use $_GET["fldcategory"] as default in add page and $_GET["Pos"] in add page of other view/table.
Just a note on your other post : I would edit and take out IP address you have there for sec. reasons.

S
swanside author 8/30/2017

Thanks John

I will give that a go. No issues over the IP address, I put in manually 192.168.0.16 as I was using a Hyper V machine to test the appication on

Cheers

Paul.