Page 1 of 1
Posted:
Fri Aug 10, 2007 6:52 am
by siainmi
Hi,
It possible to use df_display with insertFromBarCode.html? For example:
$mioPar= array('relationship'=>'Somministrazioni','table' => 'anagrafica','IDAssistito' => $_POST['assistito'],'cursor'=>1 );
df_display($mioPar,"insertFromBarCode.html");
This get me an error, is correct? I can do it?
Thx for help!
Posted:
Fri Aug 10, 2007 6:56 am
by siainmi
Sorry, I using my template name.
the code is:
$mioPar= array('relationship'=>'Somministrazioni','table' => 'anagrafica','IDAssistito' => $_POST['assistito'],'cursor'=>1 );
df_display($mioPar,"Dataface_Related_Records_List.html");
or if I using template, code of template insertFromBarCode.html:
{use_macro file="Dataface_Related_Records_List.html"}
{/use_macro}
Apologise for my mistake
Posted:
Mon Aug 13, 2007 8:53 am
by shannah
It would help if you let me know what errors it gave you.
The first option would work (df_display($mioPar,"insertFromBarCode.html") as long as you have your insertFromBarCode.html file in your application's templates folder.
The second option you mentioned is a little bit more sketchy, because you have to make sure that you are passing the correct inputs to the Dataface_Related_List.html template - and I don't recall off the top of my head what those might be .Ê You would need a little bit of trial and error.Ê
What are you trying to achieve here?
-Steve
Posted:
Tue Aug 14, 2007 2:04 am
by siainmi
Hi!
the file action.ini is:
[insertFromBarCode]
template=insertFromBarCode.html
The file insertFromBarCode.html in templates folder is:
{use_macro file="Dataface_Related_Records_List.html"}
{/use_macro}
The code that I'm using to load insertFromBarCode.html
$mioPar= array('relationship'=>'Somministrazioni','table' => 'anagrafica','IDAssistito' => $_POST['assistito'],'cursor'=>1 );
df_display($mioPar,"insertFromBarCode.html");
The error msg is:
Fatal error: No relationship specified for related list.On line 764 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\SkinTool.php in function printStackTrace()
On line 12 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\templates_c\dataface\%%4F^4F5^4F541920%%Dataface_Related_Records_List.html.php in function related_list(array(),Dataface_SkinTool Object)
On line 1251 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\lib\Smarty\Smarty.class.php in function include(E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\templates_c\dataface\%%4F^4F5^4F541920%)
On line 1101 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\lib\Smarty\Smarty.class.php in function fetch(Dataface_Related_Records_List.html,,,1)
On line 265 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\SkinTool.php in function display(Dataface_Related_Records_List.html)
On line 626 of file E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\SkinTo in E:\Programmi\OCS Inventory NG\xampp\htdocs\dataface\Dataface\SkinTool.php on line 764
thx for all, Apologise for my English !!
Posted:
Tue Aug 14, 2007 2:07 am
by siainmi
Sorry, missing file relationship.ini here is it:
[Somministrazioni]
__sql__="select * from somministrazioni where Assistito='$IDAnagrafica'"
actions:addexisting=0
action:permission=edit
Posted:
Tue Aug 14, 2007 9:15 am
by shannah
Unfortunately what yoiu are trying to do is not really a recommended approach.Ê Using the Dataface_RelatedRecordsList.html template for an action other thanÊ the Dataface relationship view may have complications (and appears to have complications judging by your error message).
What are you trying to achieve?
Are you trying to make a new action that shows the same thing as the related list?
if so, why not just use the existing related list action?
Or are you trying to do something else?
Posted:
Thu Sep 13, 2007 1:17 am
by siainmi
Hi, I have create an action for insert into relative table some record, it works, but I want to return
to RelatibeRecordsList view for see imediatly the records that was append into relative table.
Thank for help!
Posted:
Thu Sep 13, 2007 9:21 am
by shannah
In your action you should be able to forward directly to the page that you want... you just have to tell it the URL to the related record page.