How to get the value entered in the Request page

mustafaAlsoufimustafaAlsoufi Member Posts: 60
edited 2022-01-13 in NAV Three Tier
I'm trying to set a range between a date field of 0D till the date entered in the Request Page

8alt5edgfynk.png
Can anyone help me with how to get the value of the date entered by the user?

Also, I want to make the "Created Date" field mandatory.

My code so far, when I hard-coded the date, the report runs perfectly fine, but I don't want to hard-code it.
8i4z3s9ne2qk.png
Any help would be appreciated

Best Answers

  • bbrownbbrown Member Posts: 3,268
    Answer ✓
    Set the source expression for your user-entry field to a global variable on the report. You can then access it to set your filter. Also to check it has a value.

    Also if you are going to put that code in the "OnAfterGetRecord" trigger, you do not need the loop. it would result in processing every record for every record. For example, if you had 100 records that code would process a total of 10,000 records. If you are going to use the report to loop the records, then only update the current record in that trigger.

    There are no bugs - only undocumented features.
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Answer ✓
    It should be a Global Variable and then pass the reference.

Answers

  • mamabrianspellsmamabrianspells Member Posts: 1
    +27738777183 Black Magic Spells, Bring Back Lost Love Today
  • bbrownbbrown Member Posts: 3,268
    Answer ✓
    Set the source expression for your user-entry field to a global variable on the report. You can then access it to set your filter. Also to check it has a value.

    Also if you are going to put that code in the "OnAfterGetRecord" trigger, you do not need the loop. it would result in processing every record for every record. For example, if you had 100 records that code would process a total of 10,000 records. If you are going to use the report to loop the records, then only update the current record in that trigger.

    There are no bugs - only undocumented features.
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Answer ✓
    It should be a Global Variable and then pass the reference.
Sign In or Register to comment.