I’m using the new view.SelectionFormula command to change a view. I then compose a new doc with field formulas related to that view. The form does not get saved - it’s just a means to display calculated values.
The problem I am having is that my form formulas do not recalculate based on the new view selection formula unless I open the view first. (which I don’t want to do) I’m using refresh but it still doesn’t update the view for the form formulas. Is there something else I can do without opening the view first?
I actually tried to open the view and then close it, but then I got the “command not available from the workspace” error, and couldn’t get around that. I’d really just rather have the view updated thru LS.
The view is set to refresh=Automatic, and here’s the code that’s giving me trouble:
…
view.SelectionFormula = newformula
Call view.Refresh
Call uiws.SetTargetFrame(“View Frame”)
Call uiws.ComposeDocument(“”,“”,“My Form”)
Call uiws.viewrefresh
I am also using view.selectionformula to update other views, but since I open these views in the frameset, they always display correctly. This one gives me trouble because I don’t actually open the view, I just want to use its contents for this form.
Any ideas, please?