Data within table does show up angular 2 primeng - primeng-datatable

I am going through a angular2 source where data are shown in a table with the help of primeng, and I am going through the following issue:
When I click on the link for the firt time, the page display that "No records found".
Then I check if data is actually loaded into the memory or not, and it is validated that the data is loaded, but is not shown in the table with the initial load.
I have the following properties set to the p-dataTable:
dt [value]="entries" [paginator]="true" [pagelinks]="3" [rowsPerPageOptions]=[5,10,20]
When I click and choose either 5, or 10, or 20 from the combo, I can see the table.
So the issue is is that when the page is loaded initially, the data is not shown in the table, even after "5" is shown on the combo for [rowsPerPageOptions]. I expect to see 5 rows in the table.
Any idea to get around with this issue?

Data is not loaded until you will not bind data with the row.
Please try like this :[rows]="5"
Ex:
dt [value]="entries" [paginator]="true" [pagelinks]="3" [rows]="5" [rowsPerPageOptions]=[5,10,20]

Related

Excel get data from web from dynamic table

I am trying to pull the full list of player data from https://stats.nba.com/players/traditional/?sort=PLAYER_NAME&dir=-1&Season=2019-20&SeasonType=Regular%20Season. However, the table is dynamic (URL doesn't change) so when I set up the connection Excel only scrapes the first 50 rows. It does not recognize that there are 6 other pages within the table that I need to scrape as well.
Does anyone know how to use the "Get Data" -> "From Web" capability in excel to import data from a dynamic table like the one shown above?
Instead of referencing the hosting page, why not use this endpoint that is returning the JSON data that populates the table? You just need to marry up the resultsSets.headers to the array positions within rowSet entries.
Edit: I found resources that explain the NBA REST API here: http://nbasense.com/nba-api/Stats/Stats/Players/AllPlayers . Take some time and review what's available. Any of those end-points can be consumed by Excel the way you are trying to.
Example:
https://stats.nba.com/stats/leaguedashplayerstats?College=&Conference=&Country=&DateFrom=&DateTo=&Division=&DraftPick=&DraftYear=&GameScope=&GameSegment=&Height=&LastNGames=0&LeagueID=00&Location=&MeasureType=Base&Month=0&OpponentTeamID=0&Outcome=&PORound=0&PaceAdjust=N&PerMode=PerGame&Period=0&PlayerExperience=&PlayerPosition=&PlusMinus=N&Rank=N&Season=2019-20&SeasonSegment=&SeasonType=Regular+Season&ShotClockRange=&StarterBench=&TeamID=0&TwoWay=0&VsConference=&VsDivision=&Weight=
Sample of a Rowset showing Aaron Gordon. Per resultSets, 2nd field is Name, 5th is age... matches the table, and gives all players not just page 1.
"rowSet": [ [ 203932, "Aaron Gordon", 1610612753, "ORL", 24.0, 1, 1, ...
For brevity, that's just a sample and far from all of the info it returns. You can click that link and see the JSON data it's returning within your browser.

Automation steps not found

I am trying to modify the comboBox values of the fields in the Automation Steps page. , but I cannot seem to be able to do it for all of them. Some of them are appearing disabled:
So I tried to make this change in the DB directly. However the graph is not public so I cannot identify the datamember definition.
I did identify however, the following tables:
- AUStepCombo: includes the Values of the combo box. In this case I obtain all the records from the smartpanel
This table, however, does not include the description.
AUCombo: includes the descriptions of the combobox, connected with AUStepCombo via the RowNbr field.
However, I noticed that the AUCombo table doesn't show all the values from the smartpanel. Only a subsection of the values from AUStepCombo. The fields disabled in the smartpanel, are the ones not inclued in this table.
Are these available in another table?
check out CROpportunityProbability table. you will see the StageIDs in there.

QTP row and column count is always 1

I am writing a piece of code to copy data from a web table to an excel sheet. I don't understand why I am getting row count and column count 1. Is there something else that I need to add?
Here is my code:
Dim XL
Set XL=createobject("Excel.Application")
XL.Workbooks.Open "D:\QTP\RailwaysforSurat.xlsx"
Set nsheet = XL.Sheets.Item(1)
row=Browser("title:=.*").Page("title:=.*").WebTable("html tag:=TABLE", "index:=0").GetROProperty("rows")
msgbox row
cols=Browser("title:=.*").Page("title:=.*").WebTable("html tag:=TABLE", "index:=1").GetROProperty("cols")
msgbox cols
This not complete code. I have trouble getting rows and columns count. Please help!
P.S. I am using this website for the testing "http://www.indianrail.gov.in/cgi_bin/inet_trnnum_cgi.cgi"
I noticed that you are using Descriptive Programming techniques to identify the WebTable, but you're using extremely generic descriptions for everything. Perhaps that's just scrubbed for the sake of posting publicly, but the important thing that I notice is that your code to read Rows is trying to find a table with Index of 0 and your code to read Cols is trying to find a table with index of 1...
This means you are accessing two different tables. Are you sure that your descriptions are finding the table that you think you want?
My suggestion is to:
1) bring up the page in your browser so that you can see the table.
2) Bring up QTP and open the GuiSPY
3) Click the pointing hand over a cube button to begin spying
4) Click on something inside the table you are trying to work with.
GuiSPY will snap back and show a hierarchy of objects that it found. Next, you want to positively identify what level in that hierarchy is the table at... I would...
5) starting at the top (Browser), select the top row and click "Highlight in Application" and watch what gets lit up.
6) go down the hierarchy list clicking the next item in the hierarchy and clicking "Highlight in Application" until you see it flash on the exact table you're trying to target.
7) Once you have isolated the table, click the button for "Copy the identification properties to the clipboard" button, then close GuiSPY.
8) Open a notepad, or just use QTP's editor window itself and paste in what GuiSPY copied to clipboard.
Ok, you now have a complete list of everything QTP was able to see about the specific table you want to detect. From here, you want to look through the list of properties and find one (or two) that would positively identify that table every time.. For example, on this very page, the table that holds your question could be identified as:
WebTable("text:=I am writing a piece of code to copy data")... (*note I've shaved it down because it's automatically a Regex string... With some cleanup, it could be:
Browser("StackOverFlow.Com").Page("Question 36663629").WebTable("text:=I am writing a piece of code to copy data"))
Now replace your .WebTable("html tag:=TABLE", "index:=0") with that data you've selected, and try it again. Hopefully you can lock in on the exact table you're expecting and get the info you need.
The indianrail page did not open so cannot see the table you are testing. But QTP provides default methods for rows and columns, try using that and see if it works.
NumRows = Browser("Mercury Tours").Page("Search Results").WebTable("OutboundFlights").RowCount
NumColumns = Browser("Mercury Tours").Page("Search Results").WebTable("OutboundFlights").ColumnCount(1)
ColumnCount takes row number as parameter
Not sure what tables you are looking at, but if it is Services and information then the rows/cols value for those table is 1.The whole web page is consisted of concatenated web tables. So its going to be little tricky to capture that information. Try using a child object method and count the number of links within the web table, its going to look something like this -
Set oWebEdit=Description.Create
oWebLink("micclass").value="Link"
Set olink = Browser("title:=.*").Page("title:=.*").WebTable("").childobjects(oWebLink)
olink.count
msgbox olink.count
'Then initiate a for loop
For i = 0 to olink.count-1
' Get the link name
olink. count(i).GetRoproperty("name")
'Initiate an array and save the link names
If get link name does not work then you can use childitem method.
Also make sure you are using the correct index for the tables or define some other properties as well.
P.S. If you are going to use DP in future and haven't already then read about Childitems/childobjects methods.They come in real handy while using DP.

Spotfire - Adding dynamic date restriction to data table which is based on an information link. Spotfire 6.0.1

I have an information link that I want to restrict in spotfire when I add it as a data table so that certain data is excluded. I want to restrict column 'DAY' to the past 91 days.
These are the steps I have tried that haven't worked:
Added data table and clicked 'load on demand' (in the 'Add Data Tables' window) and then 'settings'
On the 'DAY' column, clicked 'Define Input'
Chose 'Range(fixed/properties/expression)' as the 'Input' for the selected parameter
Then as the 'expression' for the 'Min', used: DateAdd('dd',-91,DateTimeNow())
It returns an error when I try to add a transformation to the data or just returns no data when I add the data table. If I just restrict the data with a fixed value it works as expected but clearly this would mean that I would need to change the restriction everyday. I have also been able to restrict the data to a static date directly on the information link under the 'Filters' heading. What I really need is a dynamic restriction that is placed on in some way, in Spotfire, rather than directly on the data source (Oracle).
Would be grateful for any help! Thanks!
It couldn't recognize DateTimeNow(), which is a DateTime as a Date. Spotfire gets kind of picky about that sort of thing.
Replace the Expression used for Min with
DateAdd("dd",-91,Date(DateTimeNow()))
and it should work.

Core Data and UIPickerView - Default Value

I am working on an iPhone/iPad App that is using core data. I have a Table (Entity) that wants the user to select from another Table (relationship is setup in the model). I have worked through several tutorials, and it is working very well. Select one of the second table items, save the record. When I re-edit the record the correct value is properly showing. Great (since I am very new to this, I love how some of this works!).
However, if I click to bring up the Picker again - it defaults back to the top of the list, rather than the previously selected second record. All examples I could find have something in the Picker Class on viewDidLoad to set the selected row - to an integer? How would I know what row to select, since this is a table - not an array of fixed values?

Resources