• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1458
  • Last Modified:

Problems using OpenSheetWithParm...

Lets say one have a table in a database containing some names of an application windows
(w_about, w_splash, ...), and one wants to open these windows in run time using the function OpenSheetWithParm.

Well, it seems that the named function don't allows the use of a var containg the name of the window, ?How can I do such thing????

Please help me asap. Thank you.
0
Miguel_Angel
Asked:
Miguel_Angel
  • 3
  • 2
1 Solution
 
BhattiCommented:
Try it,

These statements open a window of the type specified in the string s_w_name and store the reference to the window in the variable w_to_open. The script gets the value of s_w_name, the type of window to open, from the database. The parameter in e_location is text, so it is stored in Message.StringParm:

window w_to_open

string s_w_name, e_location
e_location = sle_location.Text
SELECT next_window INTO :s_w_name
FROM routing_table
WHERE ... ;
OpenWithParm(w_to_open, e_location, s_w_name, w_mainframe)
0
 
BhattiCommented:
Sorry!

I wrote OpenWithParm please take OpenSheetwithparm()

window w_to_open

string s_w_name, e_location

e_location = sle_location.Text

SELECT next_window INTO :s_w_name
FROM routing_table
WHERE ... ;

OpenSheetWithParm(w_to_open, e_location, s_w_name, w_mainframe)

First parameter is local declared window variable
Second is the parm (string , double or object what you have)
Third is the name of the window as string getting from database
Fourth is name of the mainframe (MDI) window
0
 
Miguel_AngelAuthor Commented:
GREAT!, thank you very much!
Quick and easy!
0
 
Miguel_AngelAuthor Commented:
ONE MORE THING PLEASE (oh, im so bad)

If i put this code in a loop, opening many windows, how can i wait one window to be closed for the next one to be opened??? (sorry for my english, im espa?ol)

Thank you in advance, Bhatti
0
 
BhattiCommented:
Hello Miquel Angel,

When application opens a First window from the loop then user works on it and close the window.

I don't know is it so or in a loop to open a many windows. If user work on first window and close the window
you should write some variable in the closewithreturn() function that may be the name of the next window you want to open and use this windowname as string in opensheetwithparm() function and if closewithreturn() return you some string say "end", then no more window to open.

//Hier select in the close event of the window to put the next window name in string to open.
Select the name window name you want to open when user close this window.


CloseWithReturn(w_window_name, "w_next_windowname")

s_w_name = Message.StringParm

OpenSheetWithParm(w_to_open, e_location, s_w_name, w_mainframe)



If it is not so let me know concrete.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now