0

New record code needing a tweak

closeRecord();
let thisRecord := this;
let myProject := 'SELECT PROJECT';
let myLoc := 'SELECT BUILDING, ROOM & DESCRIPTION';
let newRec := (create 'Project Equipment');
newRec.('SELECT PROJECT' := myProject);
newRec.('SELECT BUILDING, ROOM & DESCRIPTION' := thisRecord.'SELECT BUILDING, ROOM & DESCRIPTION');
popupRecord(newRec)

What you see above is a script to create a new record populating some fields pre-formatted - works perfectly.  However I have moved the TAB to the last in line so now when I click the button it goes to the first TAB which is the wrong TAB.

The TAB is named "INPUT.  I know one can open a form to a specific TAB but I cannot figure out where to add that here.

An example script that directs to a TAB is:

let myID := last((select 'Project Equipment').number(Id));
openRecord(record('Project Equipment',myID), "EQUIPMENT INSTALLED")

----
"EQUIPMENT INSTALLED" is the named TAB

TIA

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Does changing the last line in your code to:

    popupRecord(newRec,"INPUT")

    works for you?

    Like
      • Alan Cooke
      • Alan_Cooke.1
      • 3 mths ago
      • Reported - view

      RoSoft_Steven Aren't you just the 'bees knees'!  Thank you.  Tried every which way but that :-)

      Wish 'code' was my mother tongue sometimes.  How about lessons in 'Ninox' :-)

      Like
Like Follow
  • 3 mths agoLast active
  • 2Replies
  • 29Views
  • 2 Following