Can't fill in variable on page due to missing permission?

VhiteVhite Member Posts: 8
Hello,

On a page I have created a field with a TableRelation to the table Currency.
When a users enters a valuta in the field and moves the cursor to another field of the page, the field becomes blank again.

When the user however has the read permission on TableData 0, it is possible to enter a valuta on the field.
How can I let the user enter a valuta without giving him the read permission on TableData 0? It seems to me the user is missing some permissions, but I can't figure out which permissions are missing.

Thank you,

Vhite

Best Answer

Answers

  • VhiteVhite Member Posts: 8
    Some more information I can give is that this only happens when the source expression of the field is a variable, if the source expression is a table field, then the user can fill in a valuta without problems.

    Our version is 6.0.33793.0
  • Peter+is1Peter+is1 Member Posts: 174
    My guess is that the read permission on TableData 0 is not related to your problem.

    When you use a global variable of type record and on a page you create a Field node and set the SourceExpr to a Field of that global variable, the result will be that the user can fill in a value but the value will not be stored in the database.

    I cannot be sure of course without examening your code and objects... But perhaps it helps.
    \\
    The truth exists in seven versions.
  • VhiteVhite Member Posts: 8
    Hello Peter,

    Yes the solution you present is indeed an option to let the user enter a valuta. But if I manually program the lookup for this field, they can also enter a valuta.

    It stays weird to me that it is impossible to enter a valuta this way, but it does work if the table relation for the field is another table (for example Unit of Measure).

    Here is the example code of a page that shows this behaviour:
    OBJECT Page 70120 test
    {
      OBJECT-PROPERTIES
      {
        Date=22/04/16;
        Time=15:04:02;
        Modified=Yes;
        Version List=;
      }
      PROPERTIES
      {
      }
      CONTROLS
      {
        { 1000000000;;Container;
                    ContainerType=ContentArea }
    
        { 1000000001;1;Group  ;
                    GroupType=Group }
    
        { 1000000002;2;Field  ;
                    Name=Currency;
                    SourceExpr=codCurrency;
                    TableRelation=Currency }
    
        { 1000000003;2;Field  ;
                    Name=Unit of Measure;
                    SourceExpr=codUnitOfMeasure;
                    TableRelation="Unit of Measure" }
    
      }
      CODE
      {
        VAR
          codCurrency@1000000000 : Code[10];
          codUnitOfMeasure@1000000001 : Code[10];
    
        BEGIN
        END.
      }
    }
    

    If I enter a currency on this page, it is not stored, but if I enter a unit of measure it is stored.
  • Peter+is1Peter+is1 Member Posts: 174
    Ah, you mean stored in the Global Variable codCurrency you do not mean in the database...
    I have tested in a 2009 RTC and see the same result.

    Perhaps it has something to do with the - Base Currency = '' - configuration of Nav.
    I have no explanation. :/
    \\
    The truth exists in seven versions.
  • Peter+is1Peter+is1 Member Posts: 174
    Hi Vhite,

    The base currency in NAV (LCY) is displayed as a blank currency on ie. the customers and orders.
    (and base currency is not in currency tablet etc..)
    \\
    The truth exists in seven versions.
Sign In or Register to comment.