Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Cant create relationships (There is no option to choose junior table in add relationship)
Cant create relationships [message #3736] Mon, 13 May 2013 07:38 Go to next message
barnabooth is currently offline  barnabooth
Messages: 12
Registered: February 2011
Junior Member
This is not a bug, as someone else would have noticed it, but since version 1.77 and 1.78 There are no option for me to choose Table ID (jnr) in ADD RELATIONSHIP menu. I am at loss, do you have a clue what might be wrong?

Best regards.
Re: Cant create relationships [message #3737 is a reply to message #3736] Mon, 13 May 2013 13:16 Go to previous messageGo to next message
barnabooth is currently offline  barnabooth
Messages: 12
Registered: February 2011
Junior Member
Quiet bump: if someone does not recognize this (that is have no problem adding relationships), please just give a hint, then I know something is wrong with my installation or system, it is just that everything else runs perfectly and predictably. Thank you in advance.
Re: Cant create relationships [message #3738 is a reply to message #3736] Thu, 16 May 2013 08:33 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
I can see two things missing in that screen:
1) A red asterisk in front of the 'Table Id (jnr)' label to signify that the field is required.
2) A popup button in the 'Table Id (jnr)' value area to signify that a value is chosen from a popup screen.

This works perfectly on all my installations. The only way that those two items can be missing on the screen is if the details in the dict_retaionship.dict.inc file are wrong. You should see the following values:
    $fieldspec['table_id_jnr']              = array('type' => 'string',
                                                    'size' => 64,
                                                    'pkey' => 'y',
                                                    'required' => 'y',
                                                    'lowercase' => 'y',
                                                    'control' => 'popup',
                                                    'task_id' => 'dict_table(popup1)',
                                                    'foreign_field' => 'table_id_jnr',
                                                    'noedit' => 'y');

Can you check your copy of the file to see if it correct?


[Updated on: Thu, 16 May 2013 08:37]

Report message to a moderator

Re: Cant create relationships [message #3739 is a reply to message #3738] Thu, 16 May 2013 08:57 Go to previous messageGo to next message
barnabooth is currently offline  barnabooth
Messages: 12
Registered: February 2011
Junior Member
Thank you very much for answering, however in .../radicore/dict/classes/dict_relationship.dict.inc I read as it should be:

$fieldspec['table_id_jnr'] = array('type' => 'string',
'size' => 64,
'pkey' => 'y',
'required' => 'y',
'lowercase' => 'y',
'control' => 'popup',
'task_id' => 'dict_table(popup1)',
'foreign_field' => 'table_id_jnr',
'noedit' => 'y');

I am beginning to suspect something is wrong or some missing software/addon with my computer (ubuntu 13.04 on macbookpro 5.5 or browser (same error on both the current verions of chromium and firefox) as I have not done any changes in the radicore files. But as said, I don't experience any other oddities when running radicore. Just for curiosity, there are no red asterisk in "update relationship" either, should it be? See screendump.

index.php?t=getfile&id=274&private=0

[Updated on: Thu, 16 May 2013 11:16]

Report message to a moderator

Re: Cant create relationships [message #3742 is a reply to message #3739] Fri, 17 May 2013 06:52 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
You won't see the red asterisk in the update screen as the field is non-editable.

The $fieldspec['table_id_jnr'] array contains the entry 'noedit' => 'y', which makes the field non-editable by default, but the 'Add Relationship' task should cause the following code to be executed in the dict_relationship_jnr class:
    function _cm_changeConfig ($where, $fieldarray)
    {
        // make these fields editable
        unset($this->fieldspec['database_id_jnr']['noedit']);
        unset($this->fieldspec['table_id_jnr']['noedit']);

        return $fieldarray;

    } // _cm_changeConfig


Re: Cant create relationships [message #3743 is a reply to message #3742] Fri, 17 May 2013 14:59 Go to previous messageGo to next message
barnabooth is currently offline  barnabooth
Messages: 12
Registered: February 2011
Junior Member
Thank you for the information. The piece of code is -- as expected -- present in my installation as well. But I will try to figure out what might be wrong with my installation on the basis of this information (and try to get a better grip on the actual working of radicore as a side benefit ...).

I will return when I figure it out, or when I have something more qualified to ask about.

All the best, and again, thank you were much for answering.
Re: Cant create relationships [message #3744 is a reply to message #3743] Fri, 17 May 2013 15:58 Go to previous messageGo to next message
barnabooth is currently offline  barnabooth
Messages: 12
Registered: February 2011
Junior Member
And the end is, as always: ME STUPID.

From the dict and menu databases I could see that the last time I successfully added a relationship was 2012-12-09, I then decided to thoroughly read through the notes to each version starting with version 1.76 and, indeed, found this point

· updated the data dictionary to include screens to view relationship details from the child to its parents as well as from the parent to its children.You will need to run script 'dict.menu_export(2012-06-23).sql' in order to update the contents of your menu database.

I missed it, because I usually update 2-4 version in a row and the other sql updates in that version are at the top of the text. It was a little bit hidden --- yes, I vainly try to excuse myself -- but running it of couse made this single problem disappear.

This is of course not of any use for future reference, but I post it anyway as unsolved questions have an irritating air around them.

Thank your for your informative replies, and sorry for taking your time.
Re: Cant create relationships [message #3745 is a reply to message #3744] Sat, 18 May 2013 05:07 Go to previous message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm glad that I was able to give you enough information to help solve your problem. Now that your Radicore installation is functioning properly I hope that you will be able to move forward and generate your own application with all the features that it provides.

Previous Topic: Blocking order column feature
Next Topic: user can't insert data
Goto Forum:
  


Current Time: Sat Dec 21 12:49:29 EST 2024

Total time taken to generate the page: 0.01192 seconds