@SETFIELD question

Ok, maybe i am Just doing this wrong.I have a field named CompanyArea(text,editable, value= 1)

I am trying to add 00 to this field so it will be value = 001

I created another field that does the computation

its called CoAreaShouldBe (text, computed, Formula Below)

tempaddition1:=“0”;

tempaddition2:=“00”;

tempCo:=TempCo;

tempcoarea:=@Text(Companyarea);

elements:=@Length(@Text(CompanyArea));

@If(elements=3;tempCOArea;elements=1;(tempaddition2 + tempCoArea);elements=2;(tempaddition1+ TempCoArea);“”);

This works, but now HOW do I take this value and make it overwrite the original field called CompanyArea.

I tried creating a new field called SET (text, Computed Formula Below)

@SetField(“CompanyArea”;@Text(CoAreaShouldBe))

But nothing happens.

Help.

Subject: @SETFIELD question

If all you want is the field CompanyArea to always display numbers (up 99) with leading zeros, your current approach is much too complicated.

The best place for your code would be the input translation of CompanyArea. You could e.g. use something like this:

@Right(“000” + @ThisValue; 3)

This would also trim all numbers containing more than 3 digits, which might or might not be how you want to deal with such user input.

Subject: RE: @SETFIELD question

Thats exactly what I wanted, Now my import looks beautiful. Thank you.