This topic is locked

Additional Where tabs

9/9/2017 3:51:05 PM
ASPRunner.NET General questions
E
ericsoft author

I am use asprunner.net 9.8 & phprunner 9.8

  1. when master-detail input form. How to get master field's value for default value of detail field? Like "Session" ?
  2. Continue above question, AT "Additional WHERE clause" of "Additional Where Tabs"

    How to write Where clause Like DetailTable.Field_B=MasterTable.Field_B ?
    Thanks for reply
    ERIC

T
Tim 9/10/2017

Eric,
To get master fields use this in the "Process record values" event of the detail's Add page:
XVar data = pageObject.getMasterRecord();

if (data != null) {

values["YourDetailField"]=data["YourMasterField"].ToString();

}
For your second question, I believe you can use the new "SQL variable" feature available in 9.8. In the additional where statement of your details table's query, you can add this:
YourDetailsField = ':master.YourMasterField'
This is a new feature that I haven't used much yet, but I think I got it right.
Good luck,

Tim

E
ericsoft author 9/13/2017

Tim,

Thank you very much for your reply.

Eric