0

(Newbie) Create New Record from Button Formula Please

The (+) is too difficult to use as low contrast and need to move mouse to top of record to create new record. 

Therefore, at the end of the record form I have added a big blue button named [Create New Record]

I cannot understand from all the postings in the forum re creating records from buttons as they seem to be written for coders by coders. 

Can someone please give me the code/formula I need to add/create a new record and then move to that new blank record for input.

Thank you very much.

5 replies

null
    • Nick
    • 3 yrs ago
    • Reported - view

    Attach this code to a button:

     

    let newRec:= (create YourTableNameHere);

    openRecord(newRec)

    • PAGE
    • Bill_Page
    • 3 yrs ago
    • Reported - view

    Thanks Nick. Unfortunately I get an error and so am stuck. 

    See attached screenshots, while noting that I have one table and it is called 'Customer Data'.

    Fields

    Button at the bottom.

    Button Options

    Then Select 'On Click'

    Formula area

    Error message in Formula area.

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    You must use single quotes for your table name if it contains a space:

    ---

    let newRec := (create 'Customer Data');

    openRecord(newRec)

    ---

    Steven.

    • PAGE
    • Bill_Page
    • 3 yrs ago
    • Reported - view

    Thank you SO MUCH Steve. It works a charm :)

    (Unlike the Auto Numbering... :( in another thread)

    • Piotr_Wareciak
    • 2 yrs ago
    • Reported - view

    If You want a simple AutoNummering i have something like this on my tables :

    'number_field' := max((select table).'number_field') + 1

     

    i added that on "trigger on create" in table

Content aside

  • 2 yrs agoLast active
  • 5Replies
  • 2465Views