Mo.Saber
13th October 2022, 13:15
I am trying to change the range for tcpvat in Domain editor however, I cannot type anything or even check out the domain.

bdittmar
13th October 2022, 13:21
I am trying to change the range for tcpvat in Domain editor however, I cannot type anything or even check out the domain.

Hello,
is the domain tcpvat in your PVRC ?

Regards

Mo.Saber
13th October 2022, 13:25
Honestly, I have no clue. I am a bit of a junior. How can I check/add it to PVRC?
Note: This is a cloud environment.

(I also noticed your reply to my other thread about the line index, I will reply in detail later today.)

Mo.Saber
13th October 2022, 13:51
So I was able to find out that my current VRC is not the same as the domain VRC. How can I change my VRC?

mark_h
13th October 2022, 15:13
In 4c4 knowing your VRC's is important. So I would not change my VRC to match one of the baan standard VRC's. I can't change them anyway - no permissions. But what I can do is copy a baan domain to my development VRC. So for example I could copy a domain in package ti from B40-c4-stnd to B40T-c4-dev(our dev VRC). Now in 4c4 what I can do in maintain domains is hit the special button. Under it I have 2 choices - make PVRC current or change current package VRC of user. I always use change current package VRC of user - then I can double check and make sure I am in the right VRC. Then I can change the domain in the dev VRC, convert to runtime, test it all in my dev VRC. Once confirmed thru testing we can migrate it to production.

Just remember you have to have developer permissions and access to the VRC's. Of course I am assuming LN works the same as 4c4 for the basics.

bdittmar
13th October 2022, 15:31
[QUOTE=Mo.Saber;220231]Honestly, I have no clue. I am a bit of a junior. How can I check/add it to PVRC?
Note: This is a cloud environment.

Hello,

Domain property
The Domain property is required to define the data type of the Calculated Field.
You can select anexisting domain or create a new domain in the Extensions package.
See the Infor LN Studio Application Development Guide.


Regards

vinceco252
13th October 2022, 16:55
In a cloud environment you are not going to be able to change a domain via studio. There are a couple extensions you can do on domains - you may want to check out the extensibility developers guide.

JaapJD
14th October 2022, 12:03
There is no possibility to change the range with a domain extension. Seems to me a strange requirement to have other values than 0-100 for a percentage...
But if you want to restrict the range, so allowing only 0-90, you can do that in the table extension for the table where the percentage is inserted. You can code this in the Is Valid hook of the field:

if [your table field] > 90 then
dal.set.error.message("@Percentage should be 90 or less")
return(DALHOOKERROR)
endif

OmeLuuk
6th December 2022, 17:24
I found there is some error in the importer of domains where specifically restrictions are influenced. I ran into both regex errors and "XML-safe" errors which I fixed manually by editing the domains in Studio and or the domain files in the model directory. No change but a correction to have them in line with the application.

However you cannot import domains but when tables are imported, the used domains are imported as well.

In studio select the domain, double click it and scroll down to the "Restrictions:" part, there you can click on the "pattern" where you can fix / align the restriction to make it work.

In my case tdsmi.cfea now has pattern : [^=<>()\[\]{}"|]*
This is the more or less fixed (syntactically correct) version the latest import came up with. I had to add extra escapes for the brackets and fix an & that came with the quot.
From the importer it was : [^=<>()[]{}"|]*
In the domain the illegal characters are : =<>()[]{}"|

You can also edit the file in the model directory of your workspace
*.bdt:
<Facet>
<type>pattern</type>
<value>[^=&amp;lt;&amp;gt;()\[\]{}&amp;quot;|]*</value>
</Facet>

I just imported tcpvat and it has restrictions totalDigits 9 / fractionDigits 6 but no pattern.
In the RDD version of the domain it reads:
NAME:tcpvat
TYPE : d
DIGV : 3
DIGA : 6
DIVF : 1
RNDO : 1
OFOR : ZZ9VD999999
RANG : $$ in [0,100]
PLEN : 10

so
<Facet>
<type>pattern</type>
<value>[0-100]</value>
</Facet>
is the least to expect, which is not in the tcpvat.bdt file.