Incorrect data type for operator or @Function: Text expected

I have a Number field that is “Computed when composed”, and as a Field Value I use the following Formula code:

values := @DBColumn(“”:“”;“”:“MBAInvoice.nsf”;“Supplier\by ID”;1);

biggestnumber:= @Max(values);

nextnumber := biggestnumber + 1;

@Text(nextnumber)

It’s supposed to get me the biggest index number, and create a new one by adding one.

I just keep getting that error, originating from the @Text(nextnumber) -part.

Considering that it is a Number-field, I also tried that without @Text-function, but I still get the same error.

Subject: Incorrect data type for operator or @Function: Text expected

try @TextToNumber

Subject: Incorrect data type for operator or @Function: Text expected

Since you mentioned that the field is Number, you need to put a numeric value instead of text.

values := @DBColumn(“”:“”;“”:“MBAInvoice.nsf”;“Supplier\by ID”;1);

biggestnumber:= @Max(values);

@TextToNumber(biggestnumber + 1);

cheers !!

Ashish

Subject: RE: Incorrect data type for operator or @Function: Text expected

Thanks to both of you, it turns outthe problem was with the earlier addition

operation, as (for some reason) @Max did not

return the result as a number:

values = @DBColumn(…)

biggestNumber = @Max(values);

nextNumber = @TextToNumber(biggestNumber) + 1;

nextNumber

Cheers,

Jukka