Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6721 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

how can i set the validation of the calculation field? i need to have in a calculation field just unique values

Posted

Can you give an example of what you are trying to accomplish, other than to validate the uniqueness of a field?

Lee

Posted

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

Posted

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

Posted

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

Posted

this is not the right soluton cos this field then have to be bisplayed on the layout and i don't want that

Posted

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.

Posted (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 by Guest
Posted

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

Posted

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

Posted

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.

Posted

Can a person work on more than one paper?

Can a paper have more than one person working on it?

Lee

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.