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

2 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    Does changing the last line in your code to:

    popupRecord(newRec,"INPUT")

    works for you?

      • Alan_Cooke.1
      • 2 yrs 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' :-)

Content aside

  • 2 yrs agoLast active
  • 2Replies
  • 71Views
  • 2 Following