getting array indexoutofbound exception in maximo anywhere - maximo-anywhere

I have a list view, i select one row and try to delete a record. However when i try to delete records from top to bottom order. Last item click throws array indexoutofbound exception. Please advise with any alternatives or is this known issue in Maximo Anywhere

This issue got resolved when i removed selRecord.deleteLocal() method instead im setting a flag to know whether record is deleted or know since i need deleted record for another scenario

Related

Get Requsition ID based on PO

In FSCM I am looking to modify the Search view on Add/Update PO page (Main Menu--> Purchasing--> Purchase Orders--> Add/Update POs) to display the Requisition ID associated with the PO in the search results page. The only table I have found that has both PO_ID and REQ_ID is PS_PO_LINE_DISTRIB however unless I use a SELECT DISTINCT clause I will get multiple PO_ID rows when there are more than 1 line on a PO.
Within Purchase Order Inquiry you can see the related Requisition ID's related to a PO by clicking on Document Status link inside the Purchase Order inquiry details page.
I started looking at the PeopleCode within the the Purchase Order Inquiry to see how they are linking the PO to a Requisition and it appears to use work tables with related PeopleCode function libraries, but I wasn't able to figure our how they get linked. I am hoping someone else may know the answer to this. Thank you.
I'm on an old version of PeopleSoft (SCM 8.80, Tools 8.51), so your mileage may vary. I'm assuming you're familiar with App Designer. If not, comment below and I'll add some details about what I'm clicking on.
Find the name of the Add/Update PO component.
Open the PURCHASE_ORDER component in App Designer. Now let's find the name of the search record. Note that there is a different record for the Add Search Record, so if you want to change that too, do all of this for that record as well.
Open the PO_SRCH record, and add the REQ_ID field to it. Make sure you mark the field as a key. You should consider saving your modified PO_SRCH under a new name in case you want to be able to revert to vanilla PeopleSoft. If you do, change the Search Record in the component to your new record name.
We can see that PO_SRCH is a view. So let's modify the view to pull in REQ_ID from PO_LINE_DISTRIB. As you mentioned above, there doesn't appear to be another table with both PO_ID and REQ_ID, so you'll have to do a SELECT DISTINCT.
We should do a LEFT OUTER JOIN instead of a standard join because if you do a standard join and you enter a purchase order with no lines and save it, then you'll never be able to retrieve that purchase order in this window. Since REQ_ID is a key field, we can't have a null, so we have to do the CASE.
One odd thing that I ran into here was building the view now gave me an error about selecting fewer columns in the SQL than I had in my record definition. I solved it by modifying the view for SQL Server. I've never had to do that before and I don't know why I had to do it for this specific record. But anyway, I entered the same SQL under the record's "Microsoft SQL Server" definition.
In the properties of PO_SRCH, we can see that it has a related language record. If you're only using one language, you can probably get away without changing this, but I'll do it for completeness. Open PO_SRCHLN. Now add REQ_ID to it (mark it as a key field like you did above), and save it as PO_SRCHLN2 (I'm saving it under a new name so I don't break anything else that may be using PO_SRCHLN).
Edit the SQL the same was as you did above. Note: I didn't have to also change the Microsoft SQL Server definition like I did above. I have no idea why.
Now build PO_SRCHLN2.
Go back to PO_SRCH and change its related language record to PO_SRCHLN2.
Now build PO_SRCH.
Hopefully you didn't get any errors and your search page has the requisition ID in it now. My system doesn't use requisitions so they're all blank in the example below, but the new field is there.

reload table in WatchKit

We have a hierarchical watch app.
The root controller is a table of menu items. That list of items is controlled by a server. The data is retrieved and stored in core data. The menu is populated the first time going into the app.
But I want this table to stay current. My thought was to add code to willActivate to check if there was changes, and reload the table. In my reload logic I call the same function I called the first time, which sets the menuTable.setNumberOfRows and creates each row. Looking at what I'm putting in the logs, it is going through this logic with a different count of rows and new labels. But the app on the watch shows the table with the old data.
How can I get this table to reload with the new information?
I've had this problem too and as rmp says, it still seems to be a bug in watchOS 1.0.1. The problem appears when you try to reload your tableView after run willActivate() and nothing will happen.
In my case, I reload the tableView after receive a reply from a delegate and then I reload all the content just if it's necessary. To achieve this, I remove all rows from a NSIndexSet and load again.
if isNecessary {
self.table.removeRowsAtIndexes(NSIndexSet(indexesInRange: NSMakeRange(0, maxItems)))
isNecessary = false
}
I've tried a lot of tricks but none has worked for me:
Force to reload rows by table.setNumberOfRows(0, withRowType: "data")
Setting parameters to empty text before assign new values
One thing you could do is to hide tableView before removing rows, and avoid the remove animation.
It is a bug in WatchKit. Seems like Apple doesn't handle the repetitive interface object correctly.
The general principle here is: Only insert or remove necessary rows after a table is created. Do not reload the whole table like what we usually do in iOS. It just doesn't work (or trigger the bug).
So specifically, you have to:
Do this in willActivated method. This is correct.
If this is the first load, before the table is even created, do what you are now doing – load all table rows.
For all following times, don't reload the table, fetch the new data and check the desired number of rows.
Compare with the current number of rows in the table, insert to or remove from the bottom of the existing table.
Now simply re-assign the new data to all existing rows. Again, do not reload.
It should work if you follow the above steps.
I have found what works best given the current state of watchkit is to remove all rows then re-populate the table.
Try something like this:
- (void)loadTableData{
//clear the table
[mainTableView setNumberOfRows:0 withRowType:#"myTableRow"];
//set the row count again
[mainTableView setNumberOfRows:numberOfRows withRowType:#"myTableRow"];
//populate table
}
Its pretty simple. As Apple hasn't provided any method to reload the data.
You can still achieve that by simply populating the rows for the tableview.
Below is the sample code:
for index in 0..<tracksTableView.numberOfRows {
if let controller = tracksTableView.rowController(at: index) as? EditPlaylistRowController {
controller.playingTrackId = self.playingTrackID
controller.sharedTrack = trackItems[index]
}
}
Use it whenever you want to refresh the data.
NOTE:
You can still make some conditional statements inside the row controller class.
Happy to help :)

Issue with Finder in Drupal 7

So, I am using Drupal 7 and I'm having an issue with the Finder module.
I have a view set up with a list of a specific content type. In my Finder I have 2 select lists set up to filter the view, both with a blank option appended to the beginning, and also a text box.
When I view the page and select a value from either of the select lists the page works fine. The problem pops up when I leave both select lists blank and the text field empty. Instead of returning all results, which is the behavior I want, it return no results.
In the Finder module for my select lists I have 1 of the "Choices" set to Used Values and I have the field set to the correct content type I want to filter on. The 2nd Select List is set to "Available Options." Both Select Lists have the "Empty Choice" setting set to "empty."
If there is any other information I can provide, let me know.
This has been a very difficult bug to Google and I am hoping someone can point me in the right direction.
Answered.....Sort of.
The problem turns out to be version of WebForm module that is being used. We were using version 7.x-4.3, which is the latest, but rolled back to version 7.x-4.1 and the issue resolved itself.
It seems odd to me that a product that is used by hundreds of thousands of people would let a bug this annoying slip by.

oracle adf how to invisible current row?

I have oradcle adf and jdeveloper.
I want to invisible current row in a table by click on a button(named "delete_row") .
Can anyone help me ?
I think you are looking for a soft delete of rows from table. Refer to this post Soft deletion of rows
You can make the row invisible but once you open again the application it will show again as this information is not stored anywhere. Better you have to override the remove operation for the current row. Once the remove operation is called you should change the value of a column from the table (boolean deleted for example). The query used in VO iterator for that table should not get rows with that value as false. Please check: http://husaindalal.blogspot.com/2009/11/generic-way-to-handle-soft-delete.html

Please read scenario below and help me to solve it

I have asp.net web page which populates grid view. One of column is Status which can have (Scheduled, InProgress, Failed, OnHold, Completed) these values and another column with link in each row to edit that particular entry. Editing is only allowed for statuses Failed, OnHold, Completed not for Scheduled, InProgress on click of entry which has status Scheduled or InProgress a pop up appears saying you cannot edit.
Now, click on link and start editing data, at same time another person with same access as mine also tries to edit same data(i.e. clicks on same link) and makes Status to Scheduled and clicks submit. The data is saved in database. Before I complete editing.
Now status for that entry is Scheduled and according to requirement it cannot be edited, but I'm able to edit data and save it database.
It should not happen. How to achieve this please help.
Thanks in advance
On the function or RowUpdating Event of the grid, you should run a SQL statement checking if the status of the row currently being updated is valid for saving (per your requirements).
If it's not, then display an error that it's been updated by someone else to a status different from the one fetched by the 2nd user trying to update it.
You can make a Column in your database like "IsEdited" and whenever a record is being inserted first run a query to retrieve the value of "IsEdited" then use If-Else statement to check. If its value is True then don't run the Insert query and display error message and if its value is False then run the Insert query with data for all other columns and also a value (True) for "IsEdited" column.
If you could provide a code it would be easy to explain.

Resources