0

How to disable Create Record button in reference

Hi,

This topic was brought up 4 years ago and was closed with a reply about the cloud version of Ninox, however there was no solution suggested for the local Mac app version of Ninox.

Can someone please advise how can we do the following:

1. Disable the little "+" sign in the reference field on the form for local Mac app version.

2. How to disable a normal button on the form when a new record is created and then activate that button based on a condition from inside a script.

Context: I want the "Create Invoice" button to stay disabled from the start (record creation) on a new Sales Order form and only activate that button when the sales order is confirmed (upon pressing the "Confirm Sales Order" button).

Thanks,

Vermaji

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

21 replies

null
    • Fred
    • 1 mth ago
    • Reported - view

    Check out this post.

      • Database App Developer
      • vermau81
      • 1 mth ago
      • Reported - view

       I just checked the whole post. Actually Paul was right that a child record should not exist without a parent record (at least this is what was taught to us when we studied our very first RDBMS - Foxpro)..

      However my requirement is different.

      Scenario:

      I have a Sale Orders Form with 4 buttons on it ("Save as Draft", "Confirm Sale Order", "Create Invoice" and "Cancel Sale Order").

      Requirement - 1:

      Initially when we create a new record in the Sale Orders table, both "Confirm Sale Order" and "Create Invoice" buttons should be greyed out/disabled.

      Business Process Flow:

      A Sale Order cannot be converted to invoice until it is confirmed. User can continue to work on the Sale Order , so he can save the SO in Draft mode. Once the SO is confirmed by the manager/admin, "Save as Draft" button and "Confirm Sale Order" buttons become greyed out/disabled and "Create Invoice" button gets enabled.

      From here the admin/manager can either create invoice or cancel the SO. If he wants to make any changes to the already confirmed SO (before creating the invoice -- Say a new item needs to be added to the SO), he has to click the "Edit" button on the Sale Order Form.

      This means that the Sale Order Form will only be editable by default initially when a new SO record is created. Once the SO is saved as Draft or Confirmed, every time the SO is opened from the list, the whole form should be only READ only mode and the person has to click the "Edit" button to make it WRITABLE.

      Requirement - 2:

      Whatever is the current status of the Sale Order, I need to display that status on the form. From my findings I realise that I can't use Free Text element as a label to show the status, 'cuz I con't control it in the script to change the status dynamically based on the buttons clicked. So I have to use a Formula field instead.

      What I am not able to understand here is that how can I change the status of the Formula field itself from a script based on the action taken by another element on the form (eg: When I click the "Save as Draft" button, I want the status to change to "DRAFT MODE" and when I click on "Confirm Sale Order", I want the status to change to "SO CONFIRMED").

      I hope you can visualise what I am trying to say. Nevertheless I am attaching my database file for your perusal so that it becomes easy for you to understand. Please refer to the Sale Orders table.

      Requirement - 3:

      Is it possible in Ninox to export a particular table from a database and import that table with data or just the structure into another database. I am developing on my local copy of database in macOS and also developing on a customer module for my office in their cloud version. I want to use the base customer module that I have created for my ERP in the office module instead of creating the customer module from scratch to save time, but I can't find a way to copy the table structure from my module to the office online cloud workspace.

      Please note: I cannot create a copy of my whole database and import it into my office Ninox cloud workspace as I have already done that initially and done some development on the office side as well, so I can't lose that work by importing the whole database from my local Ninox.

      Thanks,

      Vermaji

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

      • szormpas
      • 1 mth ago
      • Reported - view

       Hi,

      As  mentioned, there are usually alternative ways to achieve a desired result.

      Since we can not change the visibility of a field directly via script, you can use an indirect method to achieve the same result by introducing an indicator field into your form.

      I attach a working database to demonstrate the concept. To summarise:

      • Add a 'Yes/No' boolean (Toggle) field  to the 'Sale Orders' table and made it invisible (set false in 'Display field only, if').
      • Clicking on the 'Confirm Sale Order' button will enable the Toggle (true) while clicking on the 'Edit' button will disable the Toggle (false).
      • Control the visibility of the buttons based on the Toggle status and whether the current user is Admin.
      • Make the records writable only when the Toggle is off (false) by placing the 'Toggle = false' script inside the 'Writable if' option of the 'Sale Orders' table.

      What do you think, can the above approach work in your database?

    • Fred
    • 1 mth ago
    • Reported - view
    • Mel_Charles
    • 1 mth ago
    • Reported - view

    Vermaji

    as always there will be several ways to do what you want.

    Okay some simple possibilities based on areas i have in place on some of my older databases

    Requirement - 1:

    Initially when we create a new record in the Sale Orders table, both "Confirm Sale Order" and "Create Invoice" buttons should be greyed out/disabled.

    okay on one of my database i use duplicate buttons for each stage

    Confirm Sale button 1 (used for display only and is set to light grey! - no coding attached other than set to hide when button 2 appears

    ie Confirm Sale button 2 (which has action script / attached)  is in colour and set to only be visible when x conditions are met) and button 1 then hides - thus occupying the same form space

    etc.

    Requirement - 2:

    I use a job status choice field and this is set to auto upadte depending upn other conditions BUT i don't wnat users to aleter it other than me (and don't want to set various user rights) So I place this file on a tab page that itself is only visible to me as Admin

    Then on the front page I have a formula that simply references that field. 

    Requirement - 3: Export

    just set a form view and add every field you want the export the db.

    you might want to look at the latest methods for exporting to Excel too. so you can export parent/child table info

    I'm on the cloud version only - if you are on cloud version you can keep multiple copies of the same database. I do used the mac only version so not sure if you can back up your local and the restore to a cloud version - thus other users should be able to advise you better 

    Nioxus is a good place to start www.nioxus.com

     

      • Database App Developer
      • vermau81
      • 1 mth ago
      • Reported - view

       Thank you for thee reply.

      For Point No 1, I guess it is not possible to place two objects (say one in color and one on in grey with no code) on top of each other 'cuz Ninox uses GRID to place the elements on the form screen. It would be great if you can share it (in case you have done this in Ninox).

      For Point No 2, I am now using a formula field to display dynamic status of the Sale Order combined with a hidden field that is only accessible in code.

      However, the problem still remain that how can I disable/grey out a button based on the action performed on another button or some business process requirement.

      For Point No 3, I tried to follow the solution provided by  however for some reason my Mac app is not showing the Import Data dialog. It shows a blank popup that stays on the screen forever.

    • Fred
    • 1 mth ago
    • Reported - view
     said:
    Is it possible in Ninox to export a particular table from a database and import that table with data or just the structure into another database.

    A bit of testing on the cloud you can only import data with a csv. This will also allow you to import the data structure and data, see the pic below.

    The problem is that you can't import formulas or subtables.

    In the MacOS app you can import another Ninox DB that is stored in your My Databases workspace, see pics below:

     

    So maybe you can download the cloud DB to your Mac. Merge in the tables you want from the other DB then upload the modified DB to the cloud.

      • Database App Developer
      • vermau81
      • 1 mth ago
      • Reported - view

       Thank you for your reply. I tried this but I just get a blank popup that stays on the screen for as long as it wants to stay (Image attached) Don't understand what is wrong where.

      If this works, then I will be happy 'cuz that is what I wanted... Working on the cloud version in the office and then download import the desired table with data on the local Ninox on Mac at home.

      • Fred
      • 1 mth ago
      • Reported - view

      What version of the app are your running? Does this happen to any DB on your Mac? You should probably email Ninox support about this.

      • Database App Developer
      • vermau81
      • 1 mth ago
      • Reported - view

       Hello Fred, I did email to them. It wasn't happening with all the DBs, just this one. I tried to delete a few fields on the form one by one and then it worked. Couldn't make out why it was happening, but it worked by trial I guess.

      1. Looks like even after 13 versions, Ninox is still buggy.

      2. It's a shame that after so many years of development the database still doesn't support the very basic UI designing elements and normal/simple programming constructs like changing the background color and text color of the elements through the code.

      3. Uses a broken column designing way to layout elements own the screen due to which we cannot design layout the elements freely on the screen. There are much better alternatives like CSS Grid etc.

      4. They have clearly lost the essence of the formula field by allowing it to practically accept anything inside itself. Drop an Image element in the Formula field and it will show the image. I mean why would I want to drop the Image element inside of a formula field when I can drop the Image element itself on the screen, 'Cuz we cannot style the Image element.

      5. Why would I care about the new 400 icons and a new color palette when the tool cannot provide a right and fulfilling basic development environment. They should stop working on the cherries and actually start worrying about the cake.

      I believe that if Ninox is not good at writing UI elements that work in a normal way, they should only provide CLI/text based interface to work with the database and leave the UI to some other better frontend app like Oracle, MySQL and other companies do. I have come far in writing my database app, but now I feel that Ninox is becoming a headache as I am going more and more deeper in designing my ERP database app.

      Every time there is a compromise 'cuz Ninox cannot do this or Ninox cannot do that... Can't design the screen as I desire, so compromise and design in some another way. I can go on and on and on, and throw out my frustration, but I guess, it is not going to put any sense in their heads, only my head will start to ache, so I make peace with myself.

      I have started to feel that though there is a higher learning curve in Filemaker, but it is a perfect low code tool to create database apps. It gives you immense power, freedom and control to design and write your apps the way you want. 

      • szormpas
      • 1 mth ago
      • Reported - view

       Hi,

      While I agree with many of your comments, allow me to play devil's advocate!

      Ninox started out as an online database, so it makes sense that it has put more effort into developing its backend.

      From version 3.10 we see significant improvements in the UI, such as the introduction of "Pages", the new colors and icons, and in the upcoming 3.13 upgrade we expect to see changes in the menu bar and sidebar. 

      Although I haven't tested it, I don't think there's anything stopping us from using Ninox exclusively as the backend and any other low-code tool as the frontend. For example, one such tool that has intrigued me recently is WeWeb and I would be interested to know if any member has combined these two tools (WeWeb + Ninox).

      In conclusion, I would like to say that no tool is perfect and that the important thing is how well it meets our specific needs.

      I would like to hear from other Members what they think about the advantages and disadvantages of Ninox!

      Best wishes

      • Fred
      • 1 mth ago
      • Reported - view

      No one software is perfect for everyone. We all have to make decisions about which software's weakness is least annoying.

      For me I am wiling to live with Ninox's limits versus others. In terms of FileMaker, there is no cloud individual license, so it is not even an option now. And compared to other cloud DBs, it is has the best, my opinion, cost/benefit ratio.

      Also, how long was FileMaker around before Ninox?

      What was FileMaker v3 like versus now?

      As said, Ninox is spending this year working on the UI part of the DB. I guess you can wait to see what Ninox looks like at the start of 2025 to see if it has moved in the direction that works for you.

    • John_Halls
    • 1 mth ago
    • Reported - view

     Re FileMaker, I'd say beware what you wish for. I have used FileMaker for 20 years and, yes, it has immense power but if yours is anything other than a small project it will require detailed planning before you put finger to key. I have written an ERP system for my business in FileMaker and I have four aborted attempts to my name. I ended up writing a framework in FileMaker, and then used that to prevent me from tying myself up in knots. Ninox has been a breath of fresh air for me.

      • gold_cat
      • 1 mth ago
      • Reported - view

       I saw the name FileMaker and clicked to take a look. As a newbie, I’d like to ask, is FileMaker easy to learn? What are the pros and cons compared to Ninox?

      • John_Halls
      • 1 mth ago
      • Reported - view

       The basics of FileMaker are slightly harder to learn than a good understanding of Ninox. Start to build something in FileMaker with a basic understanding and it is very easy to get caught up in a spider's web of complexity (of your own making). The FileMaker developers I know of all have projects on the go to undo the work of an business owner / employee who thought they could write a system for themselves.

      To become more proficient at FileMaker will take a year or two (I think it took longer than that for me) but the rewards are there to be had at the end.

      Regards John

      • John_Halls
      • 1 mth ago
      • Reported - view

      I might try to put together a pros & cons list, when I have more time on my hands.

      • szormpas
      • 1 mth ago
      • Reported - view

       Hi, maybe a new thread will be a nice idea!

    • Mel_Charles
    • 1 mth ago
    • Reported - view

    I have comissiod bespoke solutions and also used Dataflex/Dataease/Filemaker/Access and yet Ninox is streets ahead of the in terms of getting databases up and running rapidly including sharing on the web. Sure the other stuff have had years to develop the user front end etc. But all are guilty of being a pig to get to grips with once you want to go beyond the basics and want to start to really delve into.

    For me Ninox was a breath of fresh air and allowed me to rapidly change how I run my business and throw out unconnected junk (in house servers etc) that was not fit for purpose. Sure it is not perfect but guess what! - Neither am I !

    Ninox currently is ahead of me in terms of what functionally I require thus I am always on a learning journey. Personally I would like to see more standard plus ins like direct link apps to Sage Accounts/Mail Lite etc rather than having to rely on exported CVS.s but I guess these will come in time.

      • John_Halls
      • 1 mth ago
      • Reported - view

       Did you ever use Foxpro? Great product until it went over to Visual Foxpro and become object orientated (eek!). I reverse engineered Pegasus II (also written in Foxpro) in a week and used it for about ten years! 

      • Mel_Charles
      • 1 mth ago
      • Reported - view

       No John - that one passed me by. To be fair I loved Dataease it was a great RAD system and was not to far away from Ninox insofar as the designing a form also created the underlying table at the same time. (unlike Ms Access) and had a great server connection etc. Trouble was it was hopeless when re gigged to become windows based and GUI implementation/scripting engine was err terrible.

      Ninox does 99% every thing I need today, although I would love a true grid style child form when placed on a master form ie like an excel grid that you zip up /down and across and enter/edit data.. The click and open each sub record in turn is not great when entering lots of sub records - I do have a work around and use an x number of fields on the main form and button that throws the data into a subform record but this is again somewhat crude. The double click on a record is iffy and only any good once you've entered any data.

      oh yeah and a proper print engine would be nice (Crystal forms used to be fantastic and all you had to do was link your data to the form and hey presto ! forms/delivery notes etc galore...

      oh and save master style sheet templates. Like many others, I am fed up of picking the same colours/fonts on every field endless times etc

      and here is my Christmas 2024 wish -  I would like to designate one or more fields/buttons as a sticky !

      let me explain. on a given form I have a customer name and address etc.. then lots of field info..

      Then I have several tabs on that same form - now on any one of those tabs I require to see some of the info that is on the main page, so I use formulas pointed at x fields to show that info (i don't need to edit the data  on the tabbed page) so this is fine. But this means I end up with lots of formulas.  ie main field "Company" - formula field "fxCompany1", and so on ...... where as I would rather have a sticky field that will show on ALL the tabbed pages (and yes I could edit this ) I could do this will both access and dataease back in the 1990's.

      The obvious work around is not to have tabs but use show/hide field when x condition applies to replicate all the tabs but on one page ..... but I have done and boy does it get messy and complicated to keep some kind of control on!

      Think I had better shut up now John but to be fair you did ask me question ! 😀

      • Database App Developer
      • vermau81
      • 1 mth ago
      • Reported - view

       Foxpro was one of its kind dbms. I started to learn logic building in Foxpro. That's where I started to learn programming. I remember my end of term Foxpro project I took up.. It was DOS screen with 35 DOS commands replicated in Foxpro. Then came the Oracle 7, the master of all databases at that time. Memories refreshed !!

Content aside

  • 1 mth agoLast active
  • 21Replies
  • 172Views
  • 6 Following