Page 1 of 1

Informations on category of action "new related record&

PostPosted: Thu Dec 10, 2009 7:45 am
by zabelle_motte
Hello,

I am trying to personnalize the action "new related record".
I think I need information on category of this action.

It would perhaps be interresting to have the list of existing categories on this page :
http://xataface.com/documentation/tutor ... _actions_2

Or perhaps give us an idea on how to detect this category (in source code ?).

I tried to add an action [new_related_record] in my native table actions.ini but it does not work.

Thanks in advance for your answer.

Zabelle

PostPosted: Fri Dec 11, 2009 10:09 am
by shannah
Hi Zabelle,

The easiest way to see the existing categories is to check the Xataface actions.ini file.

Are you wanting to override the new_related_record action so that it behaves a little differently or create a new action in addition to it?

-Steve

I want to add a new action ...

PostPosted: Mon Dec 14, 2009 7:09 am
by zabelle_motte
Hello Steve,

And thanks for your rapid answer.
Great help to have a look at the Xataface actions.ini file !

In fact, for my intellectual curiosity, you could answer the two questions ...
;-)

I would like to suppress the "new_related_record" action button.
I don't know where to put the command line to cancel the action. I tried to put this in the parent table but this do not work.

Thanks for your help ...

Zabelle

PostPosted: Mon Dec 14, 2009 10:18 am
by shannah
You should be able to simply add the following to your application's actions.ini file.

Code: Select all
[new_related_record]
   condition="$query['-table'] != 'the_parent_table_name'"

Your solution does not work ...

PostPosted: Tue Dec 15, 2009 8:59 am
by zabelle_motte
I have been trying the solution you propose and this does not work.

I verified there where no other definition of the new_related_record action elsewhere in my parent table.

Could you verify it actually works ?

Thanks for your help.

Zabelle