0

do as database error

let nID := number('Select the related parent WWP');    <= nID = ID # of the selected record in a dynamic dd for db  'DAD-WWPData'

let z := "100";

do as database 'DAD-WWPData'    <= simple database containing 2 records.

let t := record('WWP Members',nID);

'Text wwpID' := t.Id             <=  'Text wwpID' is a text field in the calling DB 'DAD-Login'

end;

 

RESULT:   'Text wwpID' contains "100"

 

 

 

Edit the button script to:

 

let nID := number('Select the related parent WWP');    <= nID = ID # of the selected record in a dynamic dd for db  'DAD-WWPData'

let z := "100";

do as database 'DAD-WWPData'    <= simple database containing 2 records.

let t := record('WWP Members',nID);

end;

'Text wwpID' := t.Id             <=  'Text wwpID' is a text field in the calling DB 'DAD-Login'

 

RESULT:  'Text wwpID' contains "100"

 

 

 

 

 

--------------------

Edit the button script to:

 

let nID := number('Select the related parent WWP');    <= nID = ID # of the selected record in a dynamic dd for db  'DAD-WWPData'

let z := "100";

do as database 'DAD-WWPData'    <= simple database containing 2 records.

let t := record('WWP Members',nID);

let z := t.Id

end;

'Text wwpID' := z           <=  'Text wwpID' is a text field in the calling DB 'DAD-Login'

 

RESULT:  'Text wwpID' contains "100"'

 

 

 

 

--------------------

Edit the button script to:

 

let nID := number('Select the related parent WWP');    <= nID = ID # of the selected record in a dynamic dd for db  'DAD-WWPData'

let z := "100";

do as database 'DAD-WWPData'    <= simple database containing 2 records.

let t := record('WWP Members',nID);

let z := t.Id

alert(z)

end;

'Text wwpID' := z           <=  'Text wwpID' is a text field in the calling DB 'DAD-Login'

 

RESULT:  'Text wwpID' contains "100"

NO ALERT

 

I assume that NO ALERT is displayed within the DO AS DATABASE context because it is in the other DB...

But how do I extract a value from the DO AS DATABASE content into the current context?

1 reply

null
    • Louis_Cornacchia.1
    • yesterday
    • Reported - view

    FOUND THE ANSWER: 

     

    let nID := number('Select the related parent WWP');

    let z := null;

    let m := null;

    let m := do as database 'DAD-WWPData'

    var innerID := number(nID);

    record('WWP Members',innerID)

    end;

    'Text wwpID' := m.WWPID

     

    nID must be passed int the Do as Server block as above.

     

    Same is true for the DO AS SERVER context.

Content aside

  • Status Answered
  • yesterdayLast active
  • 1Replies
  • 14Views
  • 1 Following