Problem in displaying edit find window in the views?

Hello,

I have two frames frameset… On left frame outline entries and hotspot buttons i have created… and used right frame to display the views accroding to the navigation.

Now the problem, i have a action hotspot “find”, On click of this i should display "find’ window for the current view on the right frame.

Initially, application is with navigators… and this button works fine with the code,

@PostedCommand([ViewShowSearchBar];“0”);

@PostedCommand([OpenView]; @Subset( @ViewTitle; 1 ) ) ;

@PostedCommand([EditFind])

Now i replaced navigators with outlines and frames…

this code is not working here… and also tried in many ways, but of no use…

Pls suggest me if any one have idea on this…

thanks in advance…

kiran

Subject: problem in displaying edit find window in the views???

try

@SetTargetFrame(“RightframeName”);

@PostedCommand([OpenView]; “ViewName” ) ;

@PostedCommand([ViewShowSearchBar];“0”);

@PostedCommand([EditFind])

Subject: RE: problem in displaying edit find window in the views???

Hi Dennis,

thanks for your rply…

i tried this also… But i cant hard code the view name… bcos this action hav to work for any view that displaying in the right frame…

Here problem is in getting current view name in the right frame…

i used the same code…

@SetTargetFrame(“RightframeName”); @PostedCommand([OpenView]; @subset(@viewtitle;1) ) ; @PostedCommand([ViewShowSearchBar];“0”); @PostedCommand([EditFind])

code is working… but the current view is replacing with some another view… In this case @viewtitle is failed to capture the view name…

pls suggest any other sol…

thnks.

kiran

Subject: RE: problem in displaying edit find window in the views???

Maybe there are some easier way but this is my solution:

In every view, in PostOpen add

Dim s As New NotesSession

s.setenvironmentvar “currentView”, source.ViewName

Code for the action:

@SetTargetFrame(“RightFrame”);

@PostedCommand([openView];@Environment(“currentView”));

@PostedCommand([ViewShowSearchBar];“0”);

@PostedCommand([EditFind])

Subject: RE: problem in displaying edit find window in the views???

Hi Dennis,this is very fine idea… But my application contains more than 70 views… so applying this logic to all views is little bit more work…In future if want to modify any change, i have to do for all views.

Is there any other easier way to do this… if not i will go for your last solution.

thanks,

kiran

Subject: RE: problem in displaying edit find window in the views???

I can think of two different solutions.

  1. Move the button from the left navigator to be a view action button in the views that you want this functionality in. Granted, this means you have to change every view but at least you can use a shared action.

  2. Do this as a 3-step thing.

First, specify the target frame: @SetTargetFrame(“RightframeName”);

Second, call an agent: @PostedCommand([ToolsRunMacro]; “(YourAgentName)”);

The agent sets an environment variable to the current view name, that’s all: @Environment(“CurrentViewName”; @Subset(@ViewTitle; 1))

Third, issue your commands using the environment variable:

@PostedCommand([OpenView]; @Environment(“CurrentViewName”));

@PostedCommand([ViewShowSearchBar];“0”);

@PostedCommand([EditFind])

I haven’t tried but I think it will work.

Subject: RE: problem in displaying edit find window in the views???

Hi Kenneth,

The agent sets an environment variable to the current view name, that’s all: @Environment(“CurrentViewName”; @Subset(@ViewTitle; 1))

Here @viewtitle is not capturing any value… if we can capture the view title and i think no need of env var also…

problem is capturing the view name of the current opened view in the right frame…

Pls let me know if any alternate solution.

thanks,

kiran