Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Can I use hard coded value in data-source definitions for foreign keys?

    Hello,

    I have a table full of audit codes and their associated textual meaning strings. There are several sets of these in the same table (a legacy DB) as indicated by the first primary key:

    set - integer - primary 1
    audit_code : char(2) - primary 2
    audit_text : char(30)

    On my audit table it has a field for the audit code. I need to translate this into the text for those codes. I know the set number in this instance is always 2. There is no field for the set. The results will be shown in a ListGrid.

    I have tried to add a field to the data-source for the audit table to attach the foreign key value for the set, but I can't see a way to fix a hard-coded value in it (of 2 in this case). I guess in SQL I would just say something like where ... and set=2 and ...

    Any other ideas of how I can do this?

    Thanks very much, Mark.

    #2
    See the QuickStart Guide, Server Framework chapter. There are several ways to add fixed criteria like this, including DMI, the <criteria> tag and other options.

    Comment


      #3
      Hello,

      Thanks for that. I have solved it now by adding the 'set' to the audit table data-source including it from the audit codes table, and then adding a criteria to make it 2. Yesterday I just couldn't quite see how it would all hang together. Experience I guess.

      Thanks, Mark.

      Comment

      Working...
      X