This topic is locked

Automatic fill of next related fields

10/30/2010 8:09:37 PM
PHPRunner General questions
G
gtjeerdsma author

I have 3 Master tables.
Table 1: Breeds with Fields: BreedID (INT), BreedCode (VARCHAR), Breedname(VARCHAR)
Table 2: Colours with Fields: ColourID (INT), BreedID (INT), ColourCode (VARCHAR), Colour (VARCHAR)
Table 3: Pattern with Fields: PatternID (INT), BreedID (INT), PatternCode (VARCHAR), Pattern (VARCHAR)
Working Table 4: Cats

Fields: TableId (INT), Name (VARCHAR), BreedID (INT), Colour_1 (INT), ColourCode (VARCHAR), Pattern_1 (INT), PatternCode (VARCHAR), ColourPattern (VARCHAR)
All first keyfields are auto_increment.

Adding to Cats

  1. Fill textfield Name - OK
  2. Lookup for BreedID (table: Breeds, link_field: BreedID, display_field: Breedname) - OK
  3. Lookup for Colour_1 (table: Colours, link_field: ColourID, display_field: Colour)

    Dependent: Cat.control: BreedID, cat.Field: BreedID - OK
  4. --- ???? --- HOW TO FILL FIELD ColourCode AUTOMATIC WITH Colours.ColourCode AFTER 3.
  5. Lookup for Pattern_1 (table: Pattern, link_field: PatternID, display_field: Pattern)

    Dependent: Cat.control: BreedID, cat.Field: BreedID - OK
  6. --- ???? --- SAME AS 4. HOW TO FILL FIELD PatternCode AUTOMATIC WITH Pattern.PatternCode AFTER 5.
  7. --- ???? --- HOW TO FILL FIELD ColourPattern with Concatenation of fields ColourCode and PatternCode
    Example:
    Breeds: BreedID | BreedCode | Breedname

    1 | PER | Persian

    2 | MCO | Maine Coon

    3 | SIA | Siamese
    Colours: ColourID | BreedID | ColourCode | Colour

    1 | 1 | n | Black

    2 | 3 | o | Cinnamon

    3 | 2 | as | Blue Silver
    Pattern: PatternID | BreedID | PatternCode | Pattern

    1 | 3 | 21 | Tabby
    Cats: TableId | Name | BreedID | Colour_1 | ColourCode | Pattern_1 | PatternCode | ColourPattern

    1 | Garfield | Siamese | Cinnamon | o | Tabby | 21 | o 21
    Thanks for reading and any help welcome

Sergey Kornilov admin 10/31/2010

Lookup wizard in PHPRunner 5.3 provides 'Autofill' option that allows to fill other fields after selection is made.

http://xlinesoft.com/phprunner/docs/lookup_wizard.htm

G
gtjeerdsma author 11/1/2010



Lookup wizard in PHPRunner 5.3 provides 'Autofill' option that allows to fill other fields after selection is made.

http://xlinesoft.com/phprunner/docs/lookup_wizard.htm


Thanks

Rests my last question (7).

I use the autofill option 2 times for the fields ColourCode and PatternCode.

Now how to fill the field ColourPattern automatic with the content of the mentioned fields

f.i. ColourCode contains 'cs' and Patterncode '24'(both VARCHAR)

how to fill ColourPattern with 'cs 24'

if I use regular expression (concat(ColourCode,'',PatternCode) the program freezes and give a fatal error,Call to undefined function concat() ...

Sergey Kornilov admin 11/1/2010

Some manual coding will be required to make this happen.
I would ask you to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.