Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Refreshing record screen on update of child records

From: mattmaxdef (2013-01-28 05:33)

OK, I've only been working with MAXIMO for 2 weeks so you'll have to bear with me if I'm using terms wrong etc. Sorry in advance.
Customer wants a new MBO called X, where the ASSET table has a child relationship to X by having the column XID. XID is the ID of the X table.
The desired outcome is very similar to a CONTRACT in MAXIMO having associated assets.
Everything is setup in a custom application where users can modify X's fields etc. It has a table that shows all assets that are related to the record through the relationship.
I wanted the ability to associate or disassociate the assets to X from this application. So I added a button that launches a dialog, showing table of all the assets and they can check the desired assets and the application java code will set XID on the selected asset records to the ID of the X record.
Similarly a button on the X application allows users to select associated assets from the table and the java code upon pressing the 'disassociate' button will set XID on the selected assets to NULL.
This all works fine, except for the life of me I cant get the application to refresh the table that shows the assets associated to X. So even when a user associates or disassociates assets, the table remains the same. However if you exit from that record and go back into it, you can see the changes made.
I've tried calling the following methods at the end of each function:
fireDataChangeEvent();
fireChildChangedEvent();
fireStructureChangedEvent();
refreshTable();
None of them seem to do what is desired.
Has anyone got any ideas? Thanks in advance!


From: Incomm Solutions Inc. (2013-01-28 00:37)

You actually don't need to do this with Java . just go into DBConfig and
create a new table to hold the data you want, then go into Application
Designer and create a new custom application that's bound to the table.
See the section on "Creating an Application" in the Application Developer's
Guide for more info.

Note: it's definitely recommended that you do it using the Maximo internal
tools, since that makes it visible to the Maximo upgrade tools and other
functions in Maximo. Likewise I strongly recommend against adding new
tables and/or new indexes outside of the Database Configuration application
- it makes life difficult down the line, since Maximo is not aware of the
changes.



Shannon Rotz



From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of
mattmaxdef
Sent: January-27-13 10:33 PM
To: MAXIMO@yahoogroups.com
Subject: [MAXIMO List] Refreshing record screen on update of child records


OK, I've only been working with MAXIMO for 2 weeks so you'll have to bear
with me if I'm using terms wrong etc. Sorry in advance.
Customer wants a new MBO called X, where the ASSET table has a child
relationship to X by having the column XID. XID is the ID of the X table.
The desired outcome is very similar to a CONTRACT in MAXIMO having
associated assets.
Everything is setup in a custom application where users can modify X's
fields etc. It has a table that shows all assets that are related to the
record through the relationship.
I wanted the ability to associate or disassociate the assets to X from this
application. So I added a button that launches a dialog, showing table of
all the assets and they can check the desired assets and the application
java code will set XID on the selected asset records to the ID of the X
record.
Similarly a button on the X application allows users to select associated
assets from the table and the java code upon pressing the 'disassociate'
button will set XID on the selected assets to NULL.
This all works fine, except for the life of me I cant get the application to
refresh the table that shows the assets associated to X. So even when a user
associates or disassociates assets, the table remains the same. However if
you exit from that record and go back into it, you can see the changes made.
I've tried calling the following methods at the end of each function:
fireDataChangeEvent();
fireChildChangedEvent();
fireStructureChangedEvent();
refreshTable();
None of them seem to do what is desired.
Has anyone got any ideas? Thanks in advance!


From: mattmaxdef (2013-01-29 00:35)

Hi Shannon,
Thanks for your reply, it is much appreciated.
Yep, I've created a new table and the custom application bound to that table. I've done it all through the database configurator module and application designer.
What I'm talking about here is showing a table in that application which I've created, trying to show a list of related records to that new custom table. In this case it's the ASSET table, since one or more assets are related to a record in this custom table.
So it's easy to show the records via a relationship I've set up in the database configurator, but I want the user to be able to relate more assets and remove the relationship.
Sorry if I've misinterperated your reply.
Cheers!
--- In MAXIMO@yahoogroups.com, "Incomm Solutions Inc." wrote:
>
> You actually don't need to do this with Java . just go into DBConfig and
> create a new table to hold the data you want, then go into Application
> Designer and create a new custom application that's bound to the table.
> See the section on "Creating an Application" in the Application Developer's
> Guide for more info.
>
>
>
> Note: it's definitely recommended that you do it using the Maximo internal
> tools, since that makes it visible to the Maximo upgrade tools and other
> functions in Maximo. Likewise I strongly recommend against adding new
> tables and/or new indexes outside of the Database Configuration application
> - it makes life difficult down the line, since Maximo is not aware of the
> changes.
>
>
>
>
>
>
>
> Shannon Rotz
>
>
>
>
>
>
>
> From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of
> mattmaxdef
> Sent: January-27-13 10:33 PM
> To: MAXIMO@yahoogroups.com
> Subject: [MAXIMO List] Refreshing record screen on update of child records
>
>
>
>
>
> OK, I've only been working with MAXIMO for 2 weeks so you'll have to bear
> with me if I'm using terms wrong etc. Sorry in advance.
>
> Customer wants a new MBO called X, where the ASSET table has a child
> relationship to X by having the column XID. XID is the ID of the X table.
>
> The desired outcome is very similar to a CONTRACT in MAXIMO having
> associated assets.
>
> Everything is setup in a custom application where users can modify X's
> fields etc. It has a table that shows all assets that are related to the
> record through the relationship.
>
> I wanted the ability to associate or disassociate the assets to X from this
> application. So I added a button that launches a dialog, showing table of
> all the assets and they can check the desired assets and the application
> java code will set XID on the selected asset records to the ID of the X
> record.
>
> Similarly a button on the X application allows users to select associated
> assets from the table and the java code upon pressing the 'disassociate'
> button will set XID on the selected assets to NULL.
>
> This all works fine, except for the life of me I cant get the application to
> refresh the table that shows the assets associated to X. So even when a user
> associates or disassociates assets, the table remains the same. However if
> you exit from that record and go back into it, you can see the changes made.
>
> I've tried calling the following methods at the end of each function:
>
> fireDataChangeEvent();
> fireChildChangedEvent();
> fireStructureChangedEvent();
> refreshTable();
>
> None of them seem to do what is desired.
>
> Has anyone got any ideas? Thanks in advance!
>
>
>
>
>
>
>


From: Hanna, Christopher CTR (2013-01-29 07:13)

Depending on the cardinality between the two objects, you may need a breakout table to make this work. I did something very similar with a clone of lease contracts for locations instead of assets. The breakout table simply contains the keys of the two objects to be related (absolutely necessary to implement a many to many relationship), so in the application, you simply create or delete records in the breakout table. This allows the application delete and create to work because you are creating/deleting records in the breakout table as opposed to creating records in the ASSET object, so it can simply be done through the app.
-Chris H
-----Original Message-----
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of mattmaxdef
Sent: Monday, January 28, 2013 7:36 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Refreshing record screen on update of child records

Hi Shannon,
Thanks for your reply, it is much appreciated.
Yep, I've created a new table and the custom application bound to that table. I've done it all through the database configurator module and application designer.
What I'm talking about here is showing a table in that application which I've created, trying to show a list of related records to that new custom table. In this case it's the ASSET table, since one or more assets are related to a record in this custom table.
So it's easy to show the records via a relationship I've set up in the database configurator, but I want the user to be able to relate more assets and remove the relationship.
Sorry if I've misinterperated your reply.
Cheers!
--- In MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> , "Incomm Solutions Inc." wrote:
>
> You actually don't need to do this with Java . just go into DBConfig
> and create a new table to hold the data you want, then go into
> Application Designer and create a new custom application that's bound to the table.
> See the section on "Creating an Application" in the Application
> Developer's Guide for more info.
>
>
>
> Note: it's definitely recommended that you do it using the Maximo
> internal tools, since that makes it visible to the Maximo upgrade
> tools and other functions in Maximo. Likewise I strongly recommend
> against adding new tables and/or new indexes outside of the Database
> Configuration application
> - it makes life difficult down the line, since Maximo is not aware of
> the changes.
>
>
>
>
>
>
>
> Shannon Rotz
>
>
>
>
>
>
>
> From: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> [mailto:MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> ] On
> Behalf Of mattmaxdef
> Sent: January-27-13 10:33 PM
> To: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> Subject: [MAXIMO List] Refreshing record screen on update of child
> records
>
>
>
>
>
> OK, I've only been working with MAXIMO for 2 weeks so you'll have to
> bear with me if I'm using terms wrong etc. Sorry in advance.
>
> Customer wants a new MBO called X, where the ASSET table has a child
> relationship to X by having the column XID. XID is the ID of the X table.
>
> The desired outcome is very similar to a CONTRACT in MAXIMO having
> associated assets.
>
> Everything is setup in a custom application where users can modify X's
> fields etc. It has a table that shows all assets that are related to
> the record through the relationship.
>
> I wanted the ability to associate or disassociate the assets to X from
> this application. So I added a button that launches a dialog, showing
> table of all the assets and they can check the desired assets and the
> application java code will set XID on the selected asset records to
> the ID of the X record.
>
> Similarly a button on the X application allows users to select
> associated assets from the table and the java code upon pressing the 'disassociate'
> button will set XID on the selected assets to NULL.
>
> This all works fine, except for the life of me I cant get the
> application to refresh the table that shows the assets associated to
> X. So even when a user associates or disassociates assets, the table
> remains the same. However if you exit from that record and go back into it, you can see the changes made.
>
> I've tried calling the following methods at the end of each function:
>
> fireDataChangeEvent();
> fireChildChangedEvent();
> fireStructureChangedEvent();
> refreshTable();
>
> None of them seem to do what is desired.
>
> Has anyone got any ideas? Thanks in advance!
>
>
>
>
>
>
>


From: mattmaxdef (2013-01-29 23:17)

Hi Chris,
Thanks for your reply.
Yeah it is a one-to-many cardinality, so many assets to one 'X' object. This means I shouldn't need a mapping table - I just created a field in the ASSET table that that is a foreign key to the primary key of the 'X' object. This all works fine through the application. There is no deleting or adding of ASSETS in the process, all it is doing is setting this ID field in the ASSET table to relate the asset to the 'X' object. So the application either sets it to the ID of X to relate it, or sets it to NULL to un-relate it.
The actual modification of the database data works all fine. The only thing I can't do is get the application to refresh after I've made the database changes. When I'm talking about 'refreshing a table' in this case I mean an application control - not a database table. The application control needs to refresh to reflect the changes the application has made to the database - i.e. unrelating or relating assets to the X object.
Cheers!
--- In MAXIMO@yahoogroups.com, "Hanna, Christopher CTR" wrote:
>
> Depending on the cardinality between the two objects, you may need a breakout table to make this work. I did something very similar with a clone of lease contracts for locations instead of assets. The breakout table simply contains the keys of the two objects to be related (absolutely necessary to implement a many to many relationship), so in the application, you simply create or delete records in the breakout table. This allows the application delete and create to work because you are creating/deleting records in the breakout table as opposed to creating records in the ASSET object, so it can simply be done through the app.
>
> -Chris H
>
> -----Original Message-----
> From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of mattmaxdef
> Sent: Monday, January 28, 2013 7:36 PM
> To: MAXIMO@yahoogroups.com
> Subject: Re: [MAXIMO List] Refreshing record screen on update of child records
>
>
>
> Hi Shannon,
>
> Thanks for your reply, it is much appreciated.
>
> Yep, I've created a new table and the custom application bound to that table. I've done it all through the database configurator module and application designer.
>
> What I'm talking about here is showing a table in that application which I've created, trying to show a list of related records to that new custom table. In this case it's the ASSET table, since one or more assets are related to a record in this custom table.
>
> So it's easy to show the records via a relationship I've set up in the database configurator, but I want the user to be able to relate more assets and remove the relationship.
>
> Sorry if I've misinterperated your reply.
>
> Cheers!
>
> --- In MAXIMO@yahoogroups.com , "Incomm Solutions Inc." wrote:
> >
> > You actually don't need to do this with Java . just go into DBConfig
> > and create a new table to hold the data you want, then go into
> > Application Designer and create a new custom application that's bound to the table.
> > See the section on "Creating an Application" in the Application
> > Developer's Guide for more info.
> >
> >
> >
> > Note: it's definitely recommended that you do it using the Maximo
> > internal tools, since that makes it visible to the Maximo upgrade
> > tools and other functions in Maximo. Likewise I strongly recommend
> > against adding new tables and/or new indexes outside of the Database
> > Configuration application
> > - it makes life difficult down the line, since Maximo is not aware of
> > the changes.
> >
> >
> >
> >
> >
> >
> >
> > Shannon Rotz
> >
> >
> >
> >
> >
> >
> >
> > From: MAXIMO@yahoogroups.com
> > [mailto:MAXIMO@yahoogroups.com ] On
> > Behalf Of mattmaxdef
> > Sent: January-27-13 10:33 PM
> > To: MAXIMO@yahoogroups.com
> > Subject: [MAXIMO List] Refreshing record screen on update of child
> > records
> >
> >
> >
> >
> >
> > OK, I've only been working with MAXIMO for 2 weeks so you'll have to
> > bear with me if I'm using terms wrong etc. Sorry in advance.
> >
> > Customer wants a new MBO called X, where the ASSET table has a child
> > relationship to X by having the column XID. XID is the ID of the X table.
> >
> > The desired outcome is very similar to a CONTRACT in MAXIMO having
> > associated assets.
> >
> > Everything is setup in a custom application where users can modify X's
> > fields etc. It has a table that shows all assets that are related to
> > the record through the relationship.
> >
> > I wanted the ability to associate or disassociate the assets to X from
> > this application. So I added a button that launches a dialog, showing
> > table of all the assets and they can check the desired assets and the
> > application java code will set XID on the selected asset records to
> > the ID of the X record.
> >
> > Similarly a button on the X application allows users to select
> > associated assets from the table and the java code upon pressing the 'disassociate'
> > button will set XID on the selected assets to NULL.
> >
> > This all works fine, except for the life of me I cant get the
> > application to refresh the table that shows the assets associated to
> > X. So even when a user associates or disassociates assets, the table
> > remains the same. However if you exit from that record and go back into it, you can see the changes made.
> >
> > I've tried calling the following methods at the end of each function:
> >
> > fireDataChangeEvent();
> > fireChildChangedEvent();
> > fireStructureChangedEvent();
> > refreshTable();
> >
> > None of them seem to do what is desired.
> >
> > Has anyone got any ideas? Thanks in advance!
> >
> >
> >
> >
> >
> >
> >
>


From: Hanna, Christopher CTR (2013-01-30 07:23)

Typically, a screen will refresh on a save. Is this not happening? Are you calling save() in your Java or are you just clearing the ID and allowing the user to hit save explicitly? I've played around a little in the past trying to force a refresh from the custom code, never with any luck. Best bet is to try and keep the functionality as native as possible.
Although the cardinality of the relationship does not require a breakout or mapping table, there may be some functional advantages to implementing in this manner anyway. Doing it this way allows you to use simple add a delete native application functionality (operating on the breakout table) rather than having this implemented in custom Java. The flip side is that you would then have to add a unique index or a little bit of custom code in order to limit the cardinality.
-Chris H
-----Original Message-----
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of mattmaxdef
Sent: Tuesday, January 29, 2013 6:17 PM
To: MAXIMO@yahoogroups.com
Subject: Re: [MAXIMO List] Refreshing record screen on update of child records

Hi Chris,
Thanks for your reply.
Yeah it is a one-to-many cardinality, so many assets to one 'X' object. This means I shouldn't need a mapping table - I just created a field in the ASSET table that that is a foreign key to the primary key of the 'X' object. This all works fine through the application. There is no deleting or adding of ASSETS in the process, all it is doing is setting this ID field in the ASSET table to relate the asset to the 'X' object. So the application either sets it to the ID of X to relate it, or sets it to NULL to un-relate it.
The actual modification of the database data works all fine. The only thing I can't do is get the application to refresh after I've made the database changes. When I'm talking about 'refreshing a table' in this case I mean an application control - not a database table. The application control needs to refresh to reflect the changes the application has made to the database - i.e. unrelating or relating assets to the X object.
Cheers!
--- In MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> , "Hanna, Christopher CTR" wrote:
>
> Depending on the cardinality between the two objects, you may need a breakout table to make this work. I did something very similar with a clone of lease contracts for locations instead of assets. The breakout table simply contains the keys of the two objects to be related (absolutely necessary to implement a many to many relationship), so in the application, you simply create or delete records in the breakout table. This allows the application delete and create to work because you are creating/deleting records in the breakout table as opposed to creating records in the ASSET object, so it can simply be done through the app.
>
> -Chris H
>
> -----Original Message-----
> From: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> [mailto:MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> ] On
> Behalf Of mattmaxdef
> Sent: Monday, January 28, 2013 7:36 PM
> To: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> Subject: Re: [MAXIMO List] Refreshing record screen on update of child
> records
>
>
>
> Hi Shannon,
>
> Thanks for your reply, it is much appreciated.
>
> Yep, I've created a new table and the custom application bound to that table. I've done it all through the database configurator module and application designer.
>
> What I'm talking about here is showing a table in that application which I've created, trying to show a list of related records to that new custom table. In this case it's the ASSET table, since one or more assets are related to a record in this custom table.
>
> So it's easy to show the records via a relationship I've set up in the database configurator, but I want the user to be able to relate more assets and remove the relationship.
>
> Sorry if I've misinterperated your reply.
>
> Cheers!
>
> --- In MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> , "Incomm Solutions Inc." wrote:
> >
> > You actually don't need to do this with Java . just go into DBConfig
> > and create a new table to hold the data you want, then go into
> > Application Designer and create a new custom application that's bound to the table.
> > See the section on "Creating an Application" in the Application
> > Developer's Guide for more info.
> >
> >
> >
> > Note: it's definitely recommended that you do it using the Maximo
> > internal tools, since that makes it visible to the Maximo upgrade
> > tools and other functions in Maximo. Likewise I strongly recommend
> > against adding new tables and/or new indexes outside of the Database
> > Configuration application
> > - it makes life difficult down the line, since Maximo is not aware
> > of the changes.
> >
> >
> >
> >
> >
> >
> >
> > Shannon Rotz
> >
> >
> >
> >
> >
> >
> >
> > From: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> > [mailto:MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com> ]
> > On Behalf Of mattmaxdef
> > Sent: January-27-13 10:33 PM
> > To: MAXIMO@yahoogroups.com <mailto:MAXIMO%40yahoogroups.com>
> > Subject: [MAXIMO List] Refreshing record screen on update of child
> > records
> >
> >
> >
> >
> >
> > OK, I've only been working with MAXIMO for 2 weeks so you'll have to
> > bear with me if I'm using terms wrong etc. Sorry in advance.
> >
> > Customer wants a new MBO called X, where the ASSET table has a child
> > relationship to X by having the column XID. XID is the ID of the X table.
> >
> > The desired outcome is very similar to a CONTRACT in MAXIMO having
> > associated assets.
> >
> > Everything is setup in a custom application where users can modify
> > X's fields etc. It has a table that shows all assets that are
> > related to the record through the relationship.
> >
> > I wanted the ability to associate or disassociate the assets to X
> > from this application. So I added a button that launches a dialog,
> > showing table of all the assets and they can check the desired
> > assets and the application java code will set XID on the selected
> > asset records to the ID of the X record.
> >
> > Similarly a button on the X application allows users to select
> > associated assets from the table and the java code upon pressing the 'disassociate'
> > button will set XID on the selected assets to NULL.
> >
> > This all works fine, except for the life of me I cant get the
> > application to refresh the table that shows the assets associated to
> > X. So even when a user associates or disassociates assets, the table
> > remains the same. However if you exit from that record and go back into it, you can see the changes made.
> >
> > I've tried calling the following methods at the end of each function:
> >
> > fireDataChangeEvent();
> > fireChildChangedEvent();
> > fireStructureChangedEvent();
> > refreshTable();
> >
> > None of them seem to do what is desired.
> >
> > Has anyone got any ideas? Thanks in advance!
> >
> >
> >
> >
> >
> >
> >
>


From: Sean Clark-McCarthy (2013-01-30 16:27)

Assumning you're doing this all through a custom bean? Are you attaching it to the MboSet that is "in use" in the application? Or fetching a new MboSet? I've seen in the past where people will write code or business rules and they don't access the current set that's in play in the application instead effectively creating a brand new set to work with. Could you share your code snippet? Might help shed light on it.
When I have to call a refreshTable from RulesManager, we have to pass the control ID we want refreshed. I don't have access to a system at the moment so can't verify the correct commands to use, perhaps something similar is in play here?
--- Sean Clark-McCarthy
From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf Of Hanna, Christopher CTR
Sent: Wednesday, January 30, 2013 7:24 AM
To: MAXIMO@yahoogroups.com
Subject: RE: [MAXIMO List] Refreshing record screen on update of child records
Typically, a screen will refresh on a save. Is this not happening? Are you calling save() in your Java or are you just clearing the ID and allowing the user to hit save explicitly? I've played around a little in the past trying to force a refresh from the custom code, never with any luck. Best bet is to try and keep the functionality as native as possible.
Although the cardinality of the relationship does not require a breakout or mapping table, there may be some functional advantages to implementing in this manner anyway. Doing it this way allows you to use simple add a delete native application functionality (operating on the breakout table) rather than having this implemented in custom Java. The flip side is that you would then have to add a unique index or a little bit of custom code in order to limit the cardinality.
-Chris H
-----Original Message-----
From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>] On Behalf Of mattmaxdef
Sent: Tuesday, January 29, 2013 6:17 PM
To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
Subject: Re: [MAXIMO List] Refreshing record screen on update of child records
Hi Chris,
Thanks for your reply.
Yeah it is a one-to-many cardinality, so many assets to one 'X' object. This means I shouldn't need a mapping table - I just created a field in the ASSET table that that is a foreign key to the primary key of the 'X' object. This all works fine through the application. There is no deleting or adding of ASSETS in the process, all it is doing is setting this ID field in the ASSET table to relate the asset to the 'X' object. So the application either sets it to the ID of X to relate it, or sets it to NULL to un-relate it.
The actual modification of the database data works all fine. The only thing I can't do is get the application to refresh after I've made the database changes. When I'm talking about 'refreshing a table' in this case I mean an application control - not a database table. The application control needs to refresh to reflect the changes the application has made to the database - i.e. unrelating or relating assets to the X object.
Cheers!
--- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> , "Hanna, Christopher CTR" wrote:
>
> Depending on the cardinality between the two objects, you may need a breakout table to make this work. I did something very similar with a clone of lease contracts for locations instead of assets. The breakout table simply contains the keys of the two objects to be related (absolutely necessary to implement a many to many relationship), so in the application, you simply create or delete records in the breakout table. This allows the application delete and create to work because you are creating/deleting records in the breakout table as opposed to creating records in the ASSET object, so it can simply be done through the app.
>
> -Chris H
>
> -----Original Message-----
> From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
> [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> ] On
> Behalf Of mattmaxdef
> Sent: Monday, January 28, 2013 7:36 PM
> To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
> Subject: Re: [MAXIMO List] Refreshing record screen on update of child
> records
>
>
>
> Hi Shannon,
>
> Thanks for your reply, it is much appreciated.
>
> Yep, I've created a new table and the custom application bound to that table. I've done it all through the database configurator module and application designer.
>
> What I'm talking about here is showing a table in that application which I've created, trying to show a list of related records to that new custom table. In this case it's the ASSET table, since one or more assets are related to a record in this custom table.
>
> So it's easy to show the records via a relationship I've set up in the database configurator, but I want the user to be able to relate more assets and remove the relationship.
>
> Sorry if I've misinterperated your reply.
>
> Cheers!
>
> --- In MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> , "Incomm Solutions Inc." wrote:
> >
> > You actually don't need to do this with Java . just go into DBConfig
> > and create a new table to hold the data you want, then go into
> > Application Designer and create a new custom application that's bound to the table.
> > See the section on "Creating an Application" in the Application
> > Developer's Guide for more info.
> >
> >
> >
> > Note: it's definitely recommended that you do it using the Maximo
> > internal tools, since that makes it visible to the Maximo upgrade
> > tools and other functions in Maximo. Likewise I strongly recommend
> > against adding new tables and/or new indexes outside of the Database
> > Configuration application
> > - it makes life difficult down the line, since Maximo is not aware
> > of the changes.
> >
> >
> >
> >
> >
> >
> >
> > Shannon Rotz
> >
> >
> >
> >
> >
> >
> >
> > From: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
> > [mailto:MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com> ]
> > On Behalf Of mattmaxdef
> > Sent: January-27-13 10:33 PM
> > To: MAXIMO@yahoogroups.com<mailto:MAXIMO%40yahoogroups.com>
> > Subject: [MAXIMO List] Refreshing record screen on update of child
> > records
> >
> >
> >
> >
> >
> > OK, I've only been working with MAXIMO for 2 weeks so you'll have to
> > bear with me if I'm using terms wrong etc. Sorry in advance.
> >
> > Customer wants a new MBO called X, where the ASSET table has a child
> > relationship to X by having the column XID. XID is the ID of the X table.
> >
> > The desired outcome is very similar to a CONTRACT in MAXIMO having
> > associated assets.
> >
> > Everything is setup in a custom application where users can modify
> > X's fields etc. It has a table that shows all assets that are
> > related to the record through the relationship.
> >
> > I wanted the ability to associate or disassociate the assets to X
> > from this application. So I added a button that launches a dialog,
> > showing table of all the assets and they can check the desired
> > assets and the application java code will set XID on the selected
> > asset records to the ID of the X record.
> >
> > Similarly a button on the X application allows users to select
> > associated assets from the table and the java code upon pressing the 'disassociate'
> > button will set XID on the selected assets to NULL.
> >
> > This all works fine, except for the life of me I cant get the
> > application to refresh the table that shows the assets associated to
> > X. So even when a user associates or disassociates assets, the table
> > remains the same. However if you exit from that record and go back into it, you can see the changes made.
> >
> > I've tried calling the following methods at the end of each function:
> >
> > fireDataChangeEvent();
> > fireChildChangedEvent();
> > fireStructureChangedEvent();
> > refreshTable();
> >
> > None of them seem to do what is desired.
> >
> > Has anyone got any ideas? Thanks in advance!
> >
> >
> >
> >
> >
> >
> >
>


From: Chris Lawless (2013-01-30 11:35)

I don't know if others are clear but I'm not sure I fully understand what
you are expecting to see refresh and when. As I interpret this you have a
reference on ASSET that indicates that it is linked to a record in
application X - lets say LOCATIONS for sake of argument. Are you displaying
the related assets in application X in a table? If so how is the
relationship created, do you modify the asset in the Assets module or are
you looking to do the modification from within application X?
If you are doing it in application X then how...? Without an intermediate
relationship you cannot create a link without modifying an asset from
within X which would be complicated unless you are using an action or
similar. Can you describe what you have in application X in regard to the
assets and how you are wanting the UI to work?
If the expectation is that while one user is viewing a record in
application X another user relates an asset to that record then the first
user's session will have no awareness of this without a user initiated
refresh.
Chris.
On Tue, Jan 29, 2013 at 6:17 PM, mattmaxdef <mrvisible@gmail.com> wrote:
> **
>
>
> Hi Chris,
>
> Thanks for your reply.
>
> Yeah it is a one-to-many cardinality, so many assets to one 'X' object.
> This means I shouldn't need a mapping table - I just created a field in the
> ASSET table that that is a foreign key to the primary key of the 'X'
> object. This all works fine through the application. There is no deleting
> or adding of ASSETS in the process, all it is doing is setting this ID
> field in the ASSET table to relate the asset to the 'X' object. So the
> application either sets it to the ID of X to relate it, or sets it to NULL
> to un-relate it.
>
> The actual modification of the database data works all fine. The only
> thing I can't do is get the application to refresh after I've made the
> database changes. When I'm talking about 'refreshing a table' in this case
> I mean an application control - not a database table. The application
> control needs to refresh to reflect the changes the application has made to
> the database - i.e. unrelating or relating assets to the X object.
>
> Cheers!
>
> --- In MAXIMO@yahoogroups.com, "Hanna, Christopher CTR" wrote:
> >
> > Depending on the cardinality between the two objects, you may need a
> breakout table to make this work. I did something very similar with a clone
> of lease contracts for locations instead of assets. The breakout table
> simply contains the keys of the two objects to be related (absolutely
> necessary to implement a many to many relationship), so in the application,
> you simply create or delete records in the breakout table. This allows the
> application delete and create to work because you are creating/deleting
> records in the breakout table as opposed to creating records in the ASSET
> object, so it can simply be done through the app.
> >
> > -Chris H
> >
> > -----Original Message-----
> > From: MAXIMO@yahoogroups.com [mailto:MAXIMO@yahoogroups.com] On Behalf
> Of mattmaxdef
> > Sent: Monday, January 28, 2013 7:36 PM
> > To: MAXIMO@yahoogroups.com
> > Subject: Re: [MAXIMO List] Refreshing record screen on update of child
> records
> >
> >
> >
> > Hi Shannon,
> >
> > Thanks for your reply, it is much appreciated.
> >
> > Yep, I've created a new table and the custom application bound to that
> table. I've done it all through the database configurator module and
> application designer.
> >
> > What I'm talking about here is showing a table in that application which
> I've created, trying to show a list of related records to that new custom
> table. In this case it's the ASSET table, since one or more assets are
> related to a record in this custom table.
> >
> > So it's easy to show the records via a relationship I've set up in the
> database configurator, but I want the user to be able to relate more assets
> and remove the relationship.
> >
> > Sorry if I've misinterperated your reply.
> >
> > Cheers!
> >
> > --- In MAXIMO@yahoogroups.com , "Incomm Solutions Inc." wrote:
> > >
> > > You actually don't need to do this with Java . just go into DBConfig
> > > and create a new table to hold the data you want, then go into
> > > Application Designer and create a new custom application that's bound
> to the table.
> > > See the section on "Creating an Application" in the Application
> > > Developer's Guide for more info.
> > >
> > >
> > >
> > > Note: it's definitely recommended that you do it using the Maximo
> > > internal tools, since that makes it visible to the Maximo upgrade
> > > tools and other functions in Maximo. Likewise I strongly recommend
> > > against adding new tables and/or new indexes outside of the Database
> > > Configuration application
> > > - it makes life difficult down the line, since Maximo is not aware of
> > > the changes.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Shannon Rotz
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: MAXIMO@yahoogroups.com
> > > [mailto:MAXIMO@yahoogroups.com ] On
> > > Behalf Of mattmaxdef
> > > Sent: January-27-13 10:33 PM
> > > To: MAXIMO@yahoogroups.com
> > > Subject: [MAXIMO List] Refreshing record screen on update of child
> > > records
> > >
> > >
> > >
> > >
> > >
> > > OK, I've only been working with MAXIMO for 2 weeks so you'll have to
> > > bear with me if I'm using terms wrong etc. Sorry in advance.
> > >
> > > Customer wants a new MBO called X, where the ASSET table has a child
> > > relationship to X by having the column XID. XID is the ID of the X
> table.
> > >
> > > The desired outcome is very similar to a CONTRACT in MAXIMO having
> > > associated assets.
> > >
> > > Everything is setup in a custom application where users can modify X's
> > > fields etc. It has a table that shows all assets that are related to
> > > the record through the relationship.
> > >
> > > I wanted the ability to associate or disassociate the assets to X from
> > > this application. So I added a button that launches a dialog, showing
> > > table of all the assets and they can check the desired assets and the
> > > application java code will set XID on the selected asset records to
> > > the ID of the X record.
> > >
> > > Similarly a button on the X application allows users to select
> > > associated assets from the table and the java code upon pressing the
> 'disassociate'
> > > button will set XID on the selected assets to NULL.
> > >
> > > This all works fine, except for the life of me I cant get the
> > > application to refresh the table that shows the assets associated to
> > > X. So even when a user associates or disassociates assets, the table
> > > remains the same. However if you exit from that record and go back
> into it, you can see the changes made.
> > >
> > > I've tried calling the following methods at the end of each function:
> > >
> > > fireDataChangeEvent();
> > > fireChildChangedEvent();
> > > fireStructureChangedEvent();
> > > refreshTable();
> > >
> > > None of them seem to do what is desired.
> > >
> > > Has anyone got any ideas? Thanks in advance!
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>
>