I need help with this error message. A little confused. Error message!! ERROR: the data type of two matching results are imcompatibe.
I have a comupted number field with this formula,
@if(@IsDocBeingSaved ; @Do( @If
( @DbColumn “”:“NoCache”;“”:“”;“Number”;1)“”;1; @Subset@DbColumn"“:“NoCache”;”“:”";“Number”;1);1)+1)); “”)
And a button called submit which saves and submits the doc.
Does anyone know where the imcompatibly is!!
Subject: Help with error message!!!
I believe the message means that the database column you retrieved with @DbColumn, contains values of more than one datatype. For instance, if some rows contain a string and some contain a number. Since a list in macro language can only contain data of a single type, the result of the @DbColumn cannot be expressed in macro language.
Incidentally, that’s not a very efficient formula since it repeats the slow @DbColumn command. Once you’ve fixed your view, try this:
@If(!@IsDocBeingSaved ; @Return(@ThisValue); “”);
tmp := @DbColumn(“”:“NoCache”;“”:“”;“Number”;1);
@If(@IsError(tmp); 1; @Elements(tmp) = 0; 1; @Subset(tmp; 1) + 1)