Informations on category of action “new related record&

Archived from the Xataface Users forum.

zabelle_motte — Thu Dec 10, 2009 7:45 am

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


shannah — Fri Dec 11, 2009 10:09 am

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


zabelle_motte — Mon Dec 14, 2009 7:09 am

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


shannah — Mon Dec 14, 2009 10:18 am

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'"

zabelle_motte — Tue Dec 15, 2009 8:59 am

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