Pass Parameter to form

tonypangtonypang Member Posts: 101
Can I pass the parameter from one from to another form to filter out the condition?
Example :
Form A when press F5 i need to filter out ItemNo=1 then show form2

Form B when press F5 i need to filter out ItemNo=2 then show form2

Form2 is sharing. Can NAV do passing parameter?

Hope all the master can help me.
NAV

Comments

  • BeliasBelias Member Posts: 2,998
    0. what about runformview property?
    but i think that for "press F5" you mean the standard shortcut for showing a list. In that case no, you can't but you can:
    1. Create 2 different forms and filter them (not recommended as you have to copy every personalization)
    2. Run the listform by code (onpush of a command button, for example), setting the filters on a table variable and using
    form.runmodal(formnumber,tablevariable)
    
    instruction to run the prefiltered form.
    2a. for solution 2, you can make a new menubutton, with a single menuitem with shortcut "F5"(i don't remember if you can use this shortuct). hide it behind another menubutton and you're done.!!!DOCUMENT THE FEATURE!!!
    point 2a is optional, and in my opinion it's not good to overwrite the standard behavior...but i told you anyway, because your customer can ask you as a "life or dead" feature :mrgreen:
    3. (2nd solution is pretty useless, if you need only a filter). this is a mix of solution 0 and 2a: create a menuitem, use runformview property, set the shortcut, and hide (don't set the visible property, it has to be true. Instead literally HIDE THE BUTTON) the menubutton in order to have the F5 shortcut work.
    hope to be clear
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tonypangtonypang Member Posts: 101
    Thank you
    NAV
Sign In or Register to comment.