Thank you for your post.
Since there are some minor errors in your script steps, this is what I have done using FileMaker Pro 10.0v3 Advanced:
1. I created a database table with the following fields:
2. I entered the following information into the first record:
Data: Sample Data
Title: Sample Title
Description: Sample Description
NewData: Sample NewData
3. I created the script "NumData Script":
Set Variable [ $NewData ; Value: NewData ]
Show Custom Dialog [ Data ; Title ] (and added Input Field #1 as Description ]
If [ Get ( LastMessageChoice ) = 1 ]
Set Field [ Data ; $NewData ]
4. I execute the script, and I change the input field Description from "Sample Description" to "SamDesc". I press Cancel. No record is added, and the contents of Description remains at "Sample Description".
5. I execute the script again, and I change the input field Description from "Sample Description" to "SamDesc". I press New. A record is added, and the new record contains the value "Sample NewData". Going back to the first record, the Description field is changed and now displays "SamDesc".
Your description that follows is difficult to understand. Let me know what I am doing differently than you, and I'll try to duplicate the problem here.
TSGAL without records and with two buttons in the custom window with zero records, if I check the pressure of the first button when there are two, the second button goes, if I press the first button is the window and nothing happens. It does not matter the type of the field because if you execute this condition:
I created a file with one field:
This is the script:
Show Custom Dialog[“Want to create a new record?”:;Bug2:: Response](Bug2::Response is a input field in custom dialog)
The script that I created has only one input field, there are no records in the database and the condition that occurs when you press the button 1 must be set a record.
If you put an input field and do not write anything if the database record is zero and there are two buttons, pressing the first button should avvenire.Senza input field works, if you enter one and then it goes to press button 1 and there are no records in the database, then record zero, the first button will not work ...
Thank you for the clarification.
If you have zero records, then any entry into the Input field will be ignored since it cannot be updated, unless the Input field is a global storage field. Therefore, you can either check first for zero records prior to the Show Customer Dialog, or make the Input field a global storage field. Using your second example, if you make:
Response (Text - Global Storage)
Show Custom Dialog [ "Want to create a new record?" ; Bug2:: Response ]
will work properly.
In the test database, I also found one thing: if there is a field in the custom window and do not write anything and there are no records in the database, if you launch the script, I press the first button and does not go on the second exit from the script .
If I do not put the input field in the custom window and rerun the same script and press the first button, even if there are no records in the database, the condition of verification of the first button is done and the record is created.
Where there is a field in the window and there are no records in the database, the first button of the custom window will not work if I remove the field from custom window, the first button goes, again without record in the database.If you need to send the file where I'm doing the tests ...
Your findings are consistent with what I said.
If you include a field from the database file for input, and there are no records in the file, the script will fail because you are trying to enter information into a record that does not exist. Removing that field, an error will not occur because you are not trying to access any information in record 0 (zero). However, a field set for global storage is available to all records, and no records need to be in the table to view the global field. Therefore, entering information into a global field would not return an error.
Ok I understand, everything depends on the record ... I tried it with FileMaker 9 and have the same problem ... I'm sorry but I wanted to understand why it seemed anomalous behavior but instead it all comes back ... thank you for your time and forgive me ...