Last post Dec 06, 2005 01:37 PM by mhj96813
Dec 01, 2005 05:44 PM|mhj96813|LINK
I have two modules on the same tab each with its own set of settings. Let's say Module A and Module B. When Module A loads its own settings how can I also load Module B's settings so that module A can use those
settings as well? Once Module A knows Module B's moduleID it would be simple. How can Module A find Module B's ModuleID? I was thinking about IMC and have Module A query Module B and ask for its ModuleID but isn't that dependent on which module is loaded
first? I need this info for Module A to load so its onload event needs to find this out and I can't assume that Module B is already loaded. right? Or am I hopelessly confused?
Dec 05, 2005 12:12 PM|iammeiam|LINK
I am trying to do the same thing (without success so far)...
I believe that you can get the ModuleId using something like:
Then you can use objModule.ModuleID to get the module id.... Don't know if there is a better way. Once you have the ModuleID how were you going to get the settings?
Someone must have done this that can provide more insight.
Dec 05, 2005 12:20 PM|iammeiam|LINK
You could try this:
Anyone have another idea?
Dec 06, 2005 03:02 AM|mhj96813|LINK
That is basically what I did. I was a bit uncomfortable using the friendly name to find the other module. The friendly name is editable by the host user on the portal. Isn't that correct? The only thing I
could figure that wasn't changeable was to iterate thru all the modules on the current tab and find the one I'm looking for based on ControlSrc. I used the hastable deal to get the settings for that module. Then I can save settings to that module using the
moduleID for the found module if I want to.
Dec 06, 2005 08:16 AM|timrolands|LINK
Dec 06, 2005 01:37 PM|mhj96813|LINK
Thanks for the help. I have it working sucessfully. I tried using IMC and I got the communication to work but when I try to use IMC between modules on load of a module. I don't think the other module was loaded enough to respond. I can't quite remember
exactly what happened. But I have it working without doing IMC in the load event..