Jump to content

Calc field -- avoiding duplicate field values


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

Recommended Posts

I have a validation by calc fora field that works fine:

cat_key = "Video"

and

Length ( firstslot ) = 7

or

cat_key = "Info Board" and

Left ( firstslot ; 3 ) = "IB_"

or

cat_key = "CID" and

Left ( firstslot ; 4 ) = "CID_"

or

cat_key = "SID" and

Left ( firstslot ; 4 ) = "SID_"

or

cat_key = "Promo" and

Left ( firstslot ; 4 ) = "PRM_"

or

cat_key = "PSA" and

Left ( firstslot ; 4 ) = "PSA_"

or

cat_key = "Raw Feed" and

Left ( firstslot; 3 ) = "RF_"

or

cat_key = "Artist Feeds" and

Left ( firstslot ; 4 ) = "AFD_"

or

cat_key = "Tosses"

and

Left ( firstslot ; 4 ) = "TOS_"

This databse is accessed through IWP where two clients could add a field value -- is there a way to further define this validation calc to prevent this possibility?

Link to comment
Share on other sites

OK -- I have the propensity to throw up a problem before I have a least an idea of a solution -- sorry.

I thought I could add to this calidation calc a parameter stating:

and ≠ ValueListItems ( firstslot ; firstslotVL_all )

where the new entry could not be a member of the value list I created of all the values that do already exist from all the records for "firstslot".

The thing is I do not see how I can name the "valueList" because FM does not see it in the fields listed in the calc window.

How does one name a valueList in this calc field?

Link to comment
Share on other sites

Put the list in quotes - otherwise it won't work!

But by and large is the approach with validations that activates in IWP a little iffy - say you have several fields the your users have spend some times to fill out to the best of their knowledge ... If the alert then goes causes all fields entered to be discarted on submit ...in my book would it be ideal to have java scripting taking care of local validation, not as it works in IWP that the whole thing is transmitted and rejected as batch if just one or several validations doesn't fullfill a validation.

The submit should as things are working at present, load a set of globalfields where the script should then validate each entry and mark wrong entries in the globals, but not be send further into their final destinations before being correct as record.

If errors are detected should the user be guided to another layout to make the appropriate corrections.

As I see it. will there be no way around scripted validations, the native kind seems too daft, which means that time is crutial - so some kind of optimization should be required to your Case( statement ...so you're correct in thinking in the direction of valuelist, or perhaps hardwired lists and PatternCount( but also relations from the global field I see required to ensure uniqueness!

We've been discussing this in this thread , although it's native and not IWP does the reasoning have it's bearing ...especially, take a look at Comments template in the tread we reference as well ...IWP is by and large a compromise that goes a long way but perhaps not quite as long it should - with professional users being spoiled rotten with crafty use of java and PHP.

--sd

Edited by Guest
Link to comment
Share on other sites

This topic is 5706 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
 Share

×
×
  • Create New...

Important Information

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