im having an issue where im getting duplicate keys from HashMap, in the UI it appears as
for example:
Header
List item
Header
List item
Header
List item
i want to show them as follows in the UI(expected)
Header
List item
List item
List item
can any one please help me with this issue.
thanks in advance.
Make your hash map something like HashMap<String, List<Object>>, that way a single String can map to multiple Objects.
Related
Can you please suggest how to check the unique values from entire share point site to avoid duplicates records. I was able to find only for a list with option "Enforce unique values" so that i have enabled this it not allows duplicate record in that list. is there any way to compare in all the lists?
"Enforce unique values" setting is based on a list or library column.
Then I create a site column and set it to "Yes",test if this could avoid duplicate records of this column in all lists:
However, this will only limit the values on one list or library. If multiple lists use the same site column and fill in the same value, nothing happens.
So there is no such way to enforce unique values in all lists.
I am trying to append and update the data in the dictionary. As a process, I was using the for loop to update the values in the dictionary. However, the key is the same but the values are different.
dict =
dict[key1] = ['value1',value2,value3]
dict.update({key1:[value4,value5,value6]})
I need to update the data to the same key to a dictionary in different line. The following is the expected output:
print(dict)
{'key1':['value1','value2','value3'],
'key1':['value4','value5','value6']}
can someone help to fix the issue?
This is totally wrong, the whole point of dictionary's is to have different key's and to assign them the same or different values, dictionary's are for storing values based on different keys, so you can access them later. For more information click on this LINK
I'm working on a project for work, and I'm attempting to move data from a database with multiple references to different tables.
My question is; is it possible to move the data and be able to have a list that references different lists? For example, when I click on an element in the list, can I create another "link" to take me to another list?
I am not sure but if I understand the problem well You would like to create some kind of column in one list which will store reference to item from other list, correct?
If so then You are looking for lookup columns. When adding column to a list You may select lookup column type, after that You need to select which list You would like to 'reference' and which column should be present from the second list in the lookup column from the first list. Please check the reference link
OOB lookup column(similar concept as database foreign key) will be good, while CSR will be helpful for complex scenario also.
I have a CSV file which I read through a parser like superCSV. I have about 5000 records in it. I am able to put all values in the HashMap and but while iterating through it, it only displays 10 records instead of all of them. What can be the reason? I have a HashCode for Map's values in another class alongwith the equals method. Unable to understand why that might be since all the records of csv file are read perfectly by the parser. Any help is appreciated. Thank you.
maybe you wrongly count a hash of one item and you override values in hashmap.
Example. You get a 5000 contact, but you count hash by name and you have 5000 "John" then when you will iterate you will get just one item.
Please check that.
hash and equals implementation.
I've been trying to filter the view by second sorted column but so far it doesn't work.
(my underlying view is sorted by first column categorized and sorted by ascending, and the second column is sorted by ascending order as well)
How can i get through this thing? and I don't want to create one more view for this filtering
To filter by multiple keys you need to use a Java Vector with the keys you want to filter by. Here's an example of applying a filter to a sessionScope variable that you then use for the keys property of the view:
var vArray = new java.util.Vector();
vArray.addElement("key1");
vArray.addElement("key2");
sessionScope.put('viewFilter', vArray);
For search function, We have two different ways are there. One is normal search just like OS level.And another is Full index search.
Please follow the below link, U will get better idea,
[Search Query][1]
[1]: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPagesViewControlAddFullTextSearch.htm