cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How do we create a field that is a global singleton?

smccoy
12-Amethyst

How do we create a field that is a global singleton?

Our users would like to have a "Solution Build/Version Number" displayable on the Presentation Template on all Item Types.

What is the recommended approach for doing this?

I would like to utilize a custom property in the MKS Solution item type, but I'm not sure how I can reference that type of property from a field.

Please advise.

ACCEPTED SOLUTION

Accepted Solutions
LLawton
16-Pearl
(To:smccoy)

Just to clarify: your property will be global, that's for sure. But your requirement is "Our users would like to have a "Solution Build/Version Number" displayable on the Presentation Template on all Item Types." (my emphasis).

You cannot expose a property, so I guess you will have a field used by all types that you populate via trigger with the value of the property. And then, when the value of the property changes you update every item in the database?

This is how I would do it, without property:

1) Create a type used as singleton, with a field for the Solution Number. Create singleton and set field value.

2) Create an IBPL used by all other types, automatically populated to point to the singleton (not editable, of course, maybe not even relevant).

3) Create an FVA to the Solution Number, used by all other types.

When you update the singleton, all items reflect it without any work or data modification.

In this case, the singleton could be the MKS Solution type, but since you're not using a property any more,why use it? To me, the added benefit is that when the time comes to have different build numbers for different cases (I'd be shocked if that day didn't come), you're all set. All you need is to point different items to different builds.

View solution in original post

3 REPLIES 3
jgorsline
12-Amethyst
(To:smccoy)

Sean,

Which property are you trying to use? I think I have an idea of what you're looking to do, and I think we can get it working.

smccoy
12-Amethyst
(To:jgorsline)

Hi.

Thanks for the reply. At this point, I'll take any property that is "global". We started to add our own property to the MKS Solution item type, because it is global, a singleton, and seemed like the proper place. But any solution that gets the functionality that we need is equally as valid.

-Sean

LLawton
16-Pearl
(To:smccoy)

Just to clarify: your property will be global, that's for sure. But your requirement is "Our users would like to have a "Solution Build/Version Number" displayable on the Presentation Template on all Item Types." (my emphasis).

You cannot expose a property, so I guess you will have a field used by all types that you populate via trigger with the value of the property. And then, when the value of the property changes you update every item in the database?

This is how I would do it, without property:

1) Create a type used as singleton, with a field for the Solution Number. Create singleton and set field value.

2) Create an IBPL used by all other types, automatically populated to point to the singleton (not editable, of course, maybe not even relevant).

3) Create an FVA to the Solution Number, used by all other types.

When you update the singleton, all items reflect it without any work or data modification.

In this case, the singleton could be the MKS Solution type, but since you're not using a property any more,why use it? To me, the added benefit is that when the time comes to have different build numbers for different cases (I'd be shocked if that day didn't come), you're all set. All you need is to point different items to different builds.

Announcements


Top Tags