August 24, 200619 yr how can i set the validation of the calculation field? i need to have in a calculation field just unique values
August 24, 200619 yr Can you give an example of what you are trying to accomplish, other than to validate the uniqueness of a field? Lee
August 24, 200619 yr Author i have two fields and they don't have to be unique, but the conbination of these fields have to. i haven't found any other solution than to put them together in a calclation field(getastext(firstfield)&" "&getastext(secondfield)) also another solution is to set field in a script.. what i was trying too. but this is a problem, cos i can set this field only after entering the data and only if user won't use enter key but a button to save the record... and also i don't know, how to prevent from the dialogs, which are shown because of the uniqueness of the field i am setting... so unique calculation field can solve my problem(cos i don't need a script to check a uniqueness) and dialogues... that's another problem i have
August 24, 200619 yr That isn't what I meant, I guess I should have asked what is the purpose of the field? i.e. are you calculating a serial number, checking to see if the record already exists, etc. I already understood that you were Concatenating the two fields and you wanted the result to be unique. What do you want to happen if it isn't unique? Lee
August 24, 200619 yr Ok So you have two fields: field1 and field2. Create a new text field ( not a calculation one ) with the option of AutoEnter/Replace a calculation and calc: field1&" "&field2 and validation option as unique
August 28, 200619 yr Author this is not the right soluton cos this field then have to be bisplayed on the layout and i don't want that
August 28, 200619 yr Author if it isn't unique, current opened record have to be reverted, 'cos data aren't consistent.
August 28, 200619 yr this is not the right soluton cos this field then have to be bisplayed on the layout and i don't want that No, you can have that field and NOT display it in the layout ! Only be sure to make a custom message if validation fails.
August 28, 200619 yr What is the purpose of these two fields, besides being used for the concatenated field? in other words, are they entering information such as a name, or street address, zip code, etc.? I also have a problem with to be reverted, 'cos data aren't consistent Can you explain how a user will know what to do when the field is rejected as not being unique? I.e., how are they going to know to change one or both of the fields, and to what to change in order to make it unique? Lee Edited August 28, 200619 yr by Guest
August 30, 200619 yr Author one field is an id of a paper and second is a commision number. and if one commision is tegisteret to the current paper, noboby should enter it again... there will be a dialogue box to say it was registered
August 30, 200619 yr Hi, if you need to verify uniqueness prior to record creation use global fields to collect and test the new input prior to creating the new record. Take in each field, do a find for the calculated field, if find finds no records - create record, else inform the user and create no record. Tim
August 30, 200619 yr If the file is big, performing a find can take some time. Why not create a relationship on the basis of a global that contains the concatenated entry values on one side, and the calculated concatenation of the real values in the file on the other side? If the relationship turns out to be valid, the value is not unique and a new record does not have to be created. You would be well advised to handle the data-entry with scripting, globals an variables: it gives you more control. You would have a confirm button on the data entry screen, that triggers the script. Users MUST click it to leave this screen and even if they decide to close the file instead of clicking it, nothing would be amiss, because the info would only be in the globals. In FMA8 you could make the concatenated global data entry value a script parameter instead of a field, set a global field to the value of that parameter and make sure that there is a relationship based on that global and the concatenated calculation which holds the real values. Then test IsValid.
August 30, 200619 yr Can a person work on more than one paper? Can a paper have more than one person working on it? Lee
August 31, 200619 yr Hi, sju. May this help? http://fmforums.com/forum/showtopic.php?tid/176916/post/206468/hl//
Create an account or sign in to comment