![]() |
lefty 7/9/2019 |
Hi All, I am running into an issue with inline add and auto-fill. When I do normal add page it works fine but when I use inline nothing shows. I have it set to perform the event after field change. I put the alert and that does work for inline and normal add. Here is my code: Client Before: var val = this.getValue(); params["val"]=val; Server: $sql = "Select Descr, LTRIM(rtrim(DfltSOUnit)) As SOUnit, LTRIM(rtrim(DfltPoUnit)) As POUnit from Inventory where InvtId = '" .$params["val"]. "'"; $rs = CustomQuery($sql); $data = db_fetch_array($rs); $result["Descr"] = $data["Descr"]; $result["SOUnit"] = $data["SOUnit"]; $result["POUnit"] = $data["POUnit"]; $result["SQL"] = $sql; Client After: alert(result["Descr"] + " " +result["SOUnit"] + " " + result["POUnit"]); var ctlPrice = pageObj.getControl('Descr'); ctlPrice.setValue(result["Descr"]); var ctlPrice = pageObj.getControl('UnitDesc'); ctlPrice.setValue(result["SOUnit"]); var ctlPrice = pageObj.getControl('User7'); ctlPrice.setValue(result["POUnit"]);
|
L
|
louisbungo author 7/9/2019 |
Can you explain a little more detail . Where exactly are you putting the above code? Screenshot would go a long way. Is this a button or javascript onload of add page. If add page obviously won't work in inline . Need more info. Can we see where and all the code .
|
L
|
louisbungo author 7/10/2019 |
I solved the problem I needed to use: |
![]() |
lefty 7/10/2019 |
This code is a field event. So when an Inventory ID is entered in the ID feild it should populate the other fields listed. I included a screenshot of the add screen. I have done the same in the past for a different table in the past and it worked no problem. If anyone can give me guidance to see why it would not work for this table and will for others. Are there any output files I can look at to see if there is an error?
|