IBM Maximo Lookup selecting another value not default value - maximo

I am trying to create a lookup. I want to select from PERSON table - if I select a value through lookup, person id is selected, but I need display name value. I have tried by creating a table domain, lookup table, lookup.XML and all methods.

If you need the DisplayName copied to the local object in addition to the PersonID, then instead of a Table Domain, you need a Crossover Domain with DisplayName as a Source Field and with your local attribute that should hold the copy of Person.DisplayName as the Target Field.
If you need the DisplayName copied to the local object instead of the PersonID, then you'll need to make a lookup map on the target attribute so Maximo knows what attribute returned by the domain maps to which attribute on the local object. You set Lookup Maps with the little, white, "page" icon/button on the right side of the Attributes tab in Database Configuration for the desired target attribute.
If you just need to see the DisplayName once a PersonID is selected, then use a Mulitpart Textbox and set "Attribute for Part 2" to something like PERSON.DISPLAYNAME, where PERSON is the name of the relationship from the local object to the PERSON object.

As Preacher already mentioned, you can copy the DISPLAYNAME attribute using a lookup map - on the Database Configuration application, go to the attribute to which you want to copy - probably the one, where you used the table domain on - and click the icon.
If you have created a custom field and have no Java class on it, you will still need the table domain, so leave that on the attribute. Now, on the lookup map, you can define which fields you want to copy from the source MBO to the target MBO. You can define multiple target fields from here (so no need to define a crossover domain, even if you need to copy multiple fields) - just enter a new line for any field you want to copy from the source (Person) object.
On many versions of Maximo you will have to restart before this starts working! I believe you don't have to restart on 7.6, but on any previous version you will probably have to.
Now, about the definition in lookups.XML: if you want to show different attributes than the ones, already shown on the default "person" lookup, you need to define your own, as you did. If the default one looks fine, for you, you can just use "person" as the lookup, since the logic of copying fields is defined in the lookup map, not in lookups.XML.

Related

change value of one field on the basis of other using spfx field customizer

I have a field name called Security(choice field) and other field name is Sensitivity. I want to copy the values of Security in Sensitivity in the list view. For example if value of security is Internal then in sensitivity column also it should show Internal in the list view only irrespective of the values stored in sensitivity. In laymen term Both field should show same values. I am new in spfx environment. Please help. I am using react framework. Let me know if you need any other details.
PS- I have 400k libraries consisting same column with same internal name so column formatting option is not suitable. we need o deploy as an extension so that it will change listview across all libraries.
In SPFx Field Customizer, implement the onRenderCell with below logic:
The method has signature as follows:
public onRenderCell(event: IFieldCustomizerCellEventParameters): void
Use below code to get the Security field value:
const securityValue = event.listItem["_values"].get("Security");
Once you get the item id, you can get the value of other field from same item.
Return the value as:
event.domElement.innerHTML = `<div>${securityValue}</div>`
Source: change value of one field on the basis of other using spfx field customizer

how to enable custom list internal id in Netsuite

NetSuite custom list internal id for values is disabled by default. is there a way i can add my own id for the custom list values.
i am trying to create a custom record to save expense clain details for employee. i have many list to hold datas for diffrent category. it will be better insted of 1,2,3 i can give my own Internal id.
Brett's answer gives you a method by which you can change the text ID of the list, but you cannot change the internal ID of the list's values. This id is set automatically by NetSuite (or probably the underlying database) and is needed to ensure consistency of data within the application. Instead, consider converting the list into a custom record, which will allow you to create another field to use as an external ID, which you can add/update by CSV import (you need to use the Internal ID as key when doing this).
Once converted to a record, you could also add a new field to use as a reference, depending on how you're using it.
To convert to a record, simply check the Convert to Custom Record box on the list page shown in your screenshot and click Save.
Click the “Change Id” button
Enter the new value.
Click Save
Note: Netsuite will prefix the value you enter with ‘customlist’

Finding Lookup item numerical values in MS Dynamics

I have a site powered by ExpressionEngine 2.5.x, using Freeform, integrated to post form data to MS Dynamics CRM 2011. The extension is nicely scalable, I can change the mapping, all that excellent stuff. My problem is how to find mapping values for Lookup fields in MS Dynamics.
I am trying to map form fields from the site forms, into MS Dynamics. Some of the fields are Lookups, in MS Dynamics. Our mapping calls out the numerical value of the Lookup item, rather than its name. (Which is good, because ppl can change the text names in the MS Dynamics console without breaking the mapping.)
My question is: I know how to find the actual back-end field names of form fields within MS Dynamics. But how to I find the numerical values of the picklist items and lookup fields? Say I have a Lookup field, for Lead Source (called campaignid). The items are:
web
online
radio ad
flyer
word of mouth
other
I know that when I edit options in an option set, I can see their numerical value. Where can I edit options in a lookup field? I've tried looking under Settings > Customizations > Customize the System, but didn't see anything called lookup.
Lookups are pointers to entities. They do not have numerical values like regular option sets. So I guess that you will have entity called Campaign (or lead) so you can check which campaigns exist in the crm DB where each entity will have view in the DB.
Let's see if i understand your question. You don't have a Lookup option like Option Set because a lookup is consequence of a relationship 1:N between two entities. So for edit a lookup you need edit a record of a entity. In lookup fields you don't have numerical values, you have guid that represent individually a record, so in a record a lookup is stored in database as a guid. Check this video.
Check here how find this guid with the record open.
A look-up field is, roughly speaking a pointer to en entity (in C# it's referred to as EntityReference instead of Entity) and it consist mainly of a guid and logical name of something.
Usually, in the code, when you have an entity, in order to access the fields of its lookup-connected entity, you'll need to make an extra query for that.
So, if you have a Contact instance and need to see the address of its parent customer, you'll have to get the guid and logical name (in this case it'll be Account) and retrieve the data for it separately.
EDIT:
Suppose that you have created an instance of Contact entity and you'd like to access its lastName field. Then you can simply refer to it as follows.
var value = Xrm.Page.getAttribute(“lastName”).getValue();
On the same form, there's also a field that refers to an Account instance (its name is parentCustomerId. Suppose now that you'd like to get the fullName field of the Account. One could expect the following to work.
var account = Xrm.Page.getAttribute("parentCusomterId").getValue();
var name = account.getAttribute("fullName").getValue();
However, that's not going to work, because the parentCutomerId is a look-up field. It means that it only contains a guid (a pointer, a reference) identifying an other entity. You'll have to use it (the guid) in order to fetch the instance that the look-up is "mentioning". Then you'll be able to check it's properties.

FileMaker Pro pop up values from related table

I have a portal in my contacts table layout that shows related mention in a second "mentions" table. This related table has a relationship to a third "sources" table that I want the user to select from when they view the data in the "mentions" portal of my "contacts" layout. This works for the most part. The problem comes when the user changes the "source" in the portal then attempts to change the "source" in the next portal row t will change the "source" to the last select source regardless to make a selection
any ideas ?
here are some screen shots of how I have it setup
portal and specified field
and field control setup
and the relationship
You are modifying the value of the source field in the sources table, which is not what you want. You only want to use that data to populate your value list and store the serial number of that source (or the source text) in your mentions table.
1) Create a value list from sources using all values from the sources field.
2) Create a new field in the Mentions table called 'source.'
3) Add that field to the portal and remove the current sources field.
4) Apply the value list to your new field.
It sounds like your portal isn't actually the mentions table, but the sources table. Either that or the field that you're using to change the "source" is not in the mentions table, or is not the correct Table Occurrence.
The portal should be based on the Mentions table, and should contain a field in that table that refers to the sources table, not a field from the sources table.
Either way, to diagnose it further, I'd probably need more detail.

Sharepoint: Integrity of lookup fields after a list import

I got a question about the behavior of lookup fields when importing data. I wonder how the lookup fields behave when the list they point to is being replaced/imported. To explain the issue, I will provide a quick example below:
As example, assume we have these two sharepoint lists:
Product Types
-------------
+ Type Name
+ Code Nr
+ etc
Products
--------
+ Product Name
+ Product Type (Lookup field to list "Product Types")
+ etc
In my scenario, the Products List contains production data on the production Sharepoint platform. It is filled with data by the business users.
However the Product Types list contains rather static data and is maintained by the developer.
Now after a development cycle, the developer wants to deploy his new webparts and his new data (product types list). The developer performs the following procedure:
On the dev machine: Export "product type" list using stsadm
On the production machine: Delete all items in the "product type" list
On the production machine: Import the "product type" list using stsadm
This means we basically replace the "product type" list on the production server while keeping the "product" list as it is.
Now the question:
Is this safe? Will the lookup references break under certain circumstances?
Any downside of this import/export procedure?
What happens if someone accesses a "product" during the import? Will the (now invalid) reference clear its own content (become a null value).
What happens if the schema of the "product type" list changes (new column)? Will this cause any troubles?
Thanks for all feedback and suggestions!
Update 1
The imported "product type" items have the same IDs as previously deleted ones.
Update 2
Started a bounty to get some more feedback/opinions.
We have had this exact same scenario before. This is a little tricky, depending upon how you will approach it.
1) Delete and Recreate Product Type list through UI
If you delete and recreate the lookup List(Product Type in your case) through UI, then you will lose the connections because the List's id GUID will change upon recreation. So do not go that route.
2) Delete and Recreate Product Type through a Feature
If you had created the Product Type list through a feature.xml file using the <ListInstance> element, then if you delete that list and then recreate it using the same feature (basically Id attribute of ListInstance remains the same, number of list items, i.e. the number of <Row> elements, may change), the association would be maintained. So if you were adding 5 more product types, then if you had created the list using a feature, you could just delete the list and provision the new one using the same feature with extra info for new items and everything would just work!
As a side note, this is the better approach because if you have to do the upgrade on a lot of servers, then rather than doing list export import via stsadm, feature deactivation and activation is a much more recommended solution. This is how we did it.
3)Deleting all list items from Product Type and adding new ones (list is never deleted)
If you are linking the lookup field (in Product List) to the ID field of the lookup list(Product Type), you have to remember that ID is auto-incrementing, so if you delete all items and then add new ones, then their ID's would be different. Say you had 5 items with ID's (ID field is not shown in UI while editing in Datasheet view) 1-5 in the list. If you delete them and add new items, their ID's would start from 6 and not 1 again. So if your lookup field had link to the item with ID 1 in it, then this method is not going to work because there is no item with ID 1 in the Product Type list anymore. So you might want to really try this out before going to production with this method.
4) Editing the list in place
If the list is not extraordinarily huge, and you only have to make this change to one or two instances, could you not just edit the list directly in the datasheet view on the prod server? When editing in datasheet view, do not delete the item, but just overwrite the values of its columns. And you can add more items if you want. This will make sure your ID's are valid.
I have mostly talked about adding new items to the list. Now if you were deleting existing items, then your lookup fields will be affected because assuming you linked the field by ID, the ID is not present anymore since the item has been deleted. Basically, any method you use, maintaining your ID's is critical.
Now regarding your doubts/questions:
I am not too sure about stsadm export import for a list (never done it myself), but stsadm can be tricky as some operations will work on certain scopes only. So you better try out your exact scenario on a dev env.
What happens during an import is tricky again depending on the exact timing. I am sure SP has its own concurrency mechanisms, but you cannot have a definitive answer as it might probably be different based on the stage of the import. If possible, recommended approach is to do the import during a planned downtime.
Regarding changing schema of the list, a change in the schema of a list will not affect the existing list instances (for the most part). If you do this through UI, I believe SP makes changes to the content DB directly. I am not certain how you intend to do this, but if you were to add a column to an existing list using a feature, the way to do this is during feature activation by adding a new content type to the list and adding your new column to this content type. This way you add the column but do not affect the existing list items.
Good luck...
There are two components to a particular lookup: the field, and the field value. The field value only contains the ID of the item(s) it refers to, and the display field. This information is meaningless without the field, which specifies what list to look at and what field to use as the display field.
The primary reason that a Lookup will break occurs on the field scope: either the list it referred to no longer exists, or the list does not contain the required field. These would generally happen if you deleted and recreated the list, but you aren't doing that. If you do break a lookup's list reference, then the only thing you can do is re-create the lookup, because you cannot configure the list reference for a lookup field once it is created.
The downside of your import/export procedure is that you lose the validity of all currently existing lookup values. A lookup maintains its integrity based on the ID of the item it references. So when the display field changes, it still refers to the same item. If you delete the item, then the lookup no longer references it, even if you create a new item that has the same value for the display field. So you would have to reassign all of the products to the new product types.
It should be noted that if you were to revert the deletion of that item, it would return to being on the lookup! The reference to that ID is kept until the actual lookup value is updated (such as by editing the Product).
All of your now invalid references will be null for purposes of interaction. You won't see anything on display forms, and you won't have the options when you try to update the product. When you do update the product, you update it to what you just set it to, which since you can't set the non-existent IDs, means that there are no more references to those IDs.
Any changes to the Product Type list's schema that do not affect the display field specified for the lookup will not have any effect on the lookup integrity. If you do change the display field in any fashion, and of course if you delete it, then it will break in the same fashion as with the list reference. However, you can set the display field, both in the UI and in the object model, so it is easy to fix this.

Resources