sju Posted August 24, 2006 Posted August 24, 2006 how can i set the validation of the calculation field? i need to have in a calculation field just unique values
Lee Smith Posted August 24, 2006 Posted August 24, 2006 Can you give an example of what you are trying to accomplish, other than to validate the uniqueness of a field? Lee
sju Posted August 24, 2006 Author Posted August 24, 2006 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
Lee Smith Posted August 24, 2006 Posted August 24, 2006 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
Raybaudi Posted August 24, 2006 Posted August 24, 2006 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
sju Posted August 28, 2006 Author Posted August 28, 2006 this is not the right soluton cos this field then have to be bisplayed on the layout and i don't want that
sju Posted August 28, 2006 Author Posted August 28, 2006 if it isn't unique, current opened record have to be reverted, 'cos data aren't consistent.
Raybaudi Posted August 28, 2006 Posted August 28, 2006 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.
Lee Smith Posted August 28, 2006 Posted August 28, 2006 (edited) 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, 2006 by Guest
sju Posted August 30, 2006 Author Posted August 30, 2006 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
Tim W Posted August 30, 2006 Posted August 30, 2006 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
Tricky Posted August 30, 2006 Posted August 30, 2006 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.
Lee Smith Posted August 30, 2006 Posted August 30, 2006 Can a person work on more than one paper? Can a paper have more than one person working on it? Lee
sju Posted August 31, 2006 Author Posted August 31, 2006 i have to say yes as an answer to both your questions sju
aaa Posted August 31, 2006 Posted August 31, 2006 Hi, sju. May this help? http://fmforums.com/forum/showtopic.php?tid/176916/post/206468/hl//
Recommended Posts
This topic is 6721 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now