Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

can be calculation field unique

Featured Replies

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

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

Lee

  • 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

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

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

  • Author

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

  • Author

if it isn't unique, current opened record have to be reverted, 'cos data aren't consistent.

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.

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

  • 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

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

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.

Can a person work on more than one paper?

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

Lee

  • Author

i have to say yes as an answer to both your questions

sju

Hi, sju.

May this help?

http://fmforums.com/forum/showtopic.php?tid/176916/post/206468/hl//

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.