0

playing with arrays

How can you do that ?

5 replies

null
    • Fred
    • 5 mths ago
    • Reported - view

    Interesting question. The way I would go about it is to create a child table that stores the input, corresponding field, and the column/row/small square info.

    Trying to search all of the fields individually would be a nightmare to code. With a child table you can quickly search for all row1 input, then all column2 inputs, then small square1 inputs and do a unique() of the returned values and you should get all of the available choices.

    You would have a trigger after update on each square that would create/delete records in the child table.

    You could also have a button at the bottom that allows you to lock in the initial numbers so you don't accidentally change them. After you input the initial numbers, you press the button to "Lock", or whatever you want to call it, then that would set a subsequent yes/no in all records of the child to "Lock".  Then you set the writable if of the fields in the parent to look into their corresponding child record for NOT "Lock". Or something like that.

    It may sound complicated, but it is way easier than scripting the search of 81 fields.

    It is a very interesting example for a DB. Please keep us updated on your progress.

    • Fred
    • 5 mths ago
    • Reported - view

    Or instead of creating/deleting child records with each input/deleting of value, the Lock button could create all child records necessary (since you need them all), then only lock those with data.

    Which then changes the Trigger to just a copy of data to corresponding child record.

    • Fred
    • 5 mths ago
    • Reported - view

    Here is a mock up.

    There isn't an easy way to do create an interface that you ask for. You can either have an input field or a formula field, but not one that can do both. So that is why I create the bit on the side where you select the row and column and it will tell you what is possible.

      • Chris
      • 5 mths ago
      • Reported - view

       Thank you for your reply : it will take me some time to thoroughly understand your example but thank you for your involvement anyway. I will certainly come back to you! Thanks again!

      • Fred
      • 5 mths ago
      • Reported - view

      I didn't put the writable if code in all of the fields, just way too many. You can check out R9C1 to see an example.

      My thought process is that you would fill in the initial boxes with numbers, then click the Set Initial Values button. That will lock those fields so you can edit them (but I didn't set all of them).

      The unlock button unlocks all previously locked fields so you can edit them.

      I thought maybe you could add a Date field so you can have multiple examples. You would click the Create Tracking Recs button whenever you create a new record.

Content aside

  • 5 mths agoLast active
  • 5Replies
  • 54Views
  • 2 Following