The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
How to navigate between tabs through code
Posted: 10 Oct 12 8:59 AM
|
fiogf49gjkf0d Hi,
I am modifying the contacts section in SLX Client and wand to call(show) a tab.
for example if user clicks on Account Name in Contacts section it should automatically open "Family Members" tab.
Please let me know if anybode has any idea about this.
Thanks,
Haren |
|
|
| |
| |
| |
| |
|
Re: How to navigate between tabs through code
Posted: 11 Oct 12 8:18 AM
|
fiogf49gjkf0d Thanks Haren.
I have never done so in Web, but all the tabs have an ID, so we may register some Javascript to select the required tab after a page is loaded.
Regards,
Marcos
|
|
|
|
Re: How to navigate between tabs through code
Posted: 18 Oct 12 1:46 PM
|
fiogf49gjkf0d Hi RJ Samp,
Application.BasicFunctions.SetTabVisibleProperty "Contact:Family Members", True
This opens the tab but doesn't display the data in tab unless we change the tab and agin come back on the tab or refresh the SLX.
I put data population code in AXFormCreate, AXFormClick,AXFormOpen,AXFormShow , but none of the methods getting fired when we show the tab using
Application.BasicFunctions.SetTabVisibleProperty "Contact:Family Members", True
Any idea what I should do to refresh/show the data as soon as tab is being shown
Thanks,
Haren |
|
|
|
Re: How to navigate between tabs through code
Posted: 18 Oct 12 9:54 PM
|
fiogf49gjkf0d " AXFormCreate, AXFormClick,AXFormOpen,AXFormShow , but none of the methods getting fired when we show the tab using"
NONE of these fire off on a tab show. The form was created a long time ago (when all of the plugins were loaded), you didn't click on the form (you moved the form to the top through a script, not a mouse click), the form was opened a long time ago (when you opened up the Contact Main View), and it's always showing (hiding and unhiding a tab is not a form show).
Data bind a hidden edit box ID field on the form. ContactID for a Contact Tab. The do an AXFormChange script to run your grid and non data bound field data retrievals. |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 10:24 AM
|
fiogf49gjkf0d Hi RJ Samp.
I have already implemented code to populate grid on "AXFormChange" event. But this is also NOT being fired when tab is set to be visible on click of a text in Contacts main view.
I tried couple of other events also, but NONE is working.
Other option I can think about is - show the tab and then refresh the Contacts main view so that the tab also get refreshed by firing the "AXFormChange" event.
Please suggest how we can refresh Contacts main view through code after showing the tab.
For your reference - the AXFormChange calls an stored procedure to populate data in a table and then that data is getting bind in the grid.
Appreciate any help!
Thanks,
HAren |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 10:40 AM
|
fiogf49gjkf0d An AXFormChange is NEVER fired unless you have a data bound field on the form to initiate the 'change'. You must have missed my spiel about a hidden ID field (CONTACTID in this case).
Having 1 databound field is MANDATORY for executing an AXFormChange.....and I too call Grid RecordSet builders and data queries of all sorts to fetch the data......all of this initiated by an AXFormChange.
Here's an idea, add a button to the form, caption: Load Data!
Sub AXFormChange
CALL FORMDATALOADER
End Sub
sub cmdLoadData_OnClickEventHandler '' on click of Load Data button event handler.
CALL FORMDATALOADER
End sub
Sub FORMDATALOADER
get all of your stuff and populate the form
End Sub
If you can't get the button to work, you've got bigger problems than firing off an AXFormChange.... |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 10:54 AM
|
fiogf49gjkf0d Hi RJ,
I do have a text box(visible=false) which binds with Contact:ContactID . but still not firing the AFXFormChange..
Do you mean Hidden Id in other way on the form?
Thanks
Haren |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 3:27 PM
|
fiogf49gjkf0d Is this a Contact Tab? What version of SLX? put a message box on the AXFormChange...... is the AXFormchange routine listed in the Event Properties for the form?
What about my suggestion for a button click to test your loading script? |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 4:28 PM
|
fiogf49gjkf0d Y- Its a Contact tab.
I am trying to show a tab from Contact main screen - like when user click on Account Name - it will show a tab say "Account Flows". The new tab it customized one with customized data based on the Client change request.
Y - AFFormChange is listed in Event properties and we have code for that too in bith form - Contact main and new tab.
I will try - your button click suggestoins - as a last option because the user will NOT be very happy to click on " Account Name" and then click on that button in the tab again to show the data.
Thanks,
Haren
|
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 6:20 PM
|
fiogf49gjkf0d AXFormchange works, that's what you'll eventually get to.....right now I'm not convinced you know how to databind a form, run scripts, tie code into subroutines.....
Haren, this is very basic stuff...... |
|
|
|
Re: How to navigate between tabs through code
Posted: 19 Oct 12 6:33 PM
|
fiogf49gjkf0d AXFormchange is working properly when i click or open the tab manually, but not when i display the tab using "Application.BasicFunctions.SetTabVisibleProperty "Contact:<new tab plugin"", True"
Even when i tried to call the "Notes/History" (one of the default SLX tab), it doesn't fire the "AXFormchange" using "Application.BasicFunctions.SetTabVisibleProperty "Contact:Notes-History"", True" and hence grid is coming blank
I am assuming that default SLX tabs have proper databind in place...
Feels like I am stuck here.. appreciate you could help me in databinding a form with steps.... i would like to clarify here that ONLY contact:contactid can be used as standard data, rest is calculated and i am capturing in new tables (NOT actual SLX table) through store proc
thanx,
Haren
|
|
|
| |
| |
|
Re: How to navigate between tabs through code
Posted: 21 Oct 12 8:15 AM
|
fiogf49gjkf0d Finally done..
FIRST SHOW THE TAB:
Application.BasicFunctions.SetTabVisibleProperty "<custom plugin>", True
THEN CALL THE AXFORMCHANGE:
Dim objTab On Error Resume Next Set objTab= Application.MainViews.ActiveView.Tabs.Item("<custom plugin>").Form If (Err.Number = 0) Then objTab.Script.AXFormChange(Empty) Set objTab = Nothing End IF
-Haren |
|
|
|