0

Need formula for Button to create a new multi line text field

I would like to make a button that would create a new multiline text field within the current record. This way, I could add a new note/comment as needed, for each record. Bonus if the new note is auto populated with the current date, placing the cursor just after the current date, ready to start typing the note.

4 replies

null
    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    Chris

    First of all I would state this anser is NOT the most elegent as frankley I would do the above a different way!

    SO create your button and creat a multline filed (I've called mine memo)

    the in the button enetae exacty as I have done over 2 lines! (this is the force the return key)

    Screenshot 2022-01-21 at 11.04.32

    Thus each time you press the button it will do a line feed then add your todays date and the put a space after that date for your to click the field and be at that entry point.

    I dont think Ninox can allow you to have focus on a field and then auto go to an entry point within that (but I may be wrong!)

    Screenshot 2022-01-21 at 11.04.11

    Issue I see with this is - you want to auto the date then start typring extra info. Thus you can have an auto return at that point - hence I have put it at the start. But this creates an initial blank line!! (not great) you could miss this out that part of the script and accept that you press the return key after you type your comment!

    Secondly (if this was me) I would probably not use a multi line filed on the table as you are trying to mix a date and comments within the same data field I would have a linked table with a seperate date and comment fields in. Complex I know but then I would have a yes/no flag to make the related table visible or not.

     

    Anyway as stated someone may be able to improve on this :-)

    • Truck Driver
    • Chris.6
    • 2 yrs ago
    • Reported - view

    Thanks so much Mel. I figured that there must be a better way to do what I want. I think you guessed at my true intent, so...

    Would you mind going into a little more detail how you would accomplish what I am trying to do? Here is exactly what I am trying to do:

    I have a table for each student with various demographics information. I want to add dated comments as needed. For example, one comment might be about a conversation I had with them. Another on a different date, might be about something I noticed that I want to focus on. Then later on, perhaps years later, another comment might be that the student got married.

    I'm going to go ahead and start working on the linked table with the two separate fields, one for date, another for comments, to see if I can work it out on my own. 

    • Truck Driver
    • Chris.6
    • 2 yrs ago
    • Reported - view

    By the way, your initial solution is exactly what I was looking to do...initially, and it answers my initial question, perfectly. But I think that your linked table solution will be more elegant in the long run.

    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    Chris

    Yes the first idea will work (mostly!) but I fear in time you will find this limiting

    Have a look at the relationships section in the user guide as a starter

    also have a look at thr 4 videos from Nioxus on parent/child - Relationships

    They will help greatly.

    If you get stuck give us a shout!

Content aside

  • 2 yrs agoLast active
  • 4Replies
  • 219Views