Forum Discussion
Http Get with specifying 'all' for a required field
- Anonymous6 years ago
Hi parry2k : Thanks for the help! Really appreciate it.
For those newbees like me:
-I had to change the function in advance editor-> to change NoticeId type from text to number and use Number.toText(NoticeId) in the url.
-Also I copied my master data source into a 2nd table, renamed it and kept only Id Column. Then selected this table to -'Add Column', 'Invoke Custom Function' step to bring a table of records for each row/ Id on this 2nd table. After expanding the Column-> I selected which fields I need to show up in this table.
-I then added a 'Notice Details' page, added drill-through feature with 'Id', had a 'Table' visual to show info from the 2nd table [giving me the info form my api#2].
-Now I can drill-through on 'Id' from my first page/ Notice Summary: for a specific row/Id-> I go to the 'Notice Details' page and see the Details for that Notice!
Voila! 🙂
Hi parry2k : Thanks for your response.
Since the data source is [not a db table/ file, but] an API portal, in my 'Get Data' stage: I am using Other-> 'Web' -> Advanced-> then have to specify the Web url . How can I specify the custom Column when I have not yet connected and pulled data from this data source/ Get Data? Best, Sohana
Anonymous I assumed you have a list of IDS that you want to pass to the url, if that is not the case where you suppose to get ids?
- Anonymous6 years agoNot applicable
Hi parry2k Since I don't know the ids- so, trying to find a way to get "All" of them [that would not require me to specify any id]!
- parry2k6 years ago
Super User
Anonymous it doesn't make sense to me, as per the screen shot, it required Id value and you have to have set of ids you want to pull or may be there is another api call that returns Ids and then use that to pass id to this api.
It is very hard to answer with limited information and how this API works, completely shooting in the dark here.
- Anonymous6 years agoNot applicable
Hi parry2k , Hi all: Sorry for the confusion, I should have provided more info earlier.
There are two APIs (‘notice’ and ‘notice details’ ) I am trying to connect. Api#1 [notice] is my data source where I am doing “Get Data” via ‘Web’ providing the api url and Api-Key [using ‘Advanced’ feature]- get 50 most recent notices. I get the data and display them in a ‘Table’ visual. One of the fields is ‘Id', an unique field for each notice. When I click on a notice in the ‘Table’ visual, I want to see the ‘notice details’ depending on the 'Id'.
Api#2 [notice details] is what I provided the info for earlier. ‘Id’ is a required field for this Api#2 to get details for a specific notice [with that id]. Now, When I click on a specific notice on the table visual, I have the Id for that notice. I have added drill-through page with another ‘Table’ visual to display the ‘notice details’ info. I have created a measure:
Api Link for ABC Notice Detail = "https://api.abc.com/natgas/events/v1/notices/" & SELECTEDVALUE ('abc-notices_apiConnect'[Id] )
Added a button, ‘More info’ -> with Action-> Web Url and selected this measure for Conditional formatting. But clicking the button, I get ‘this page isn’t working right now’.
As mentioned earlier, I provided Api url and Api-key while I used the Api#1 as a data source. I am not using APi#2 as a data source [as I don’t know the Id ahead of time], but rather trying to connect later to get the details info. I am using the Api url in the measure, but don’t know how to pass the Api-Key- probably that’s why the error is happening.
Any idea how to resolve this issue or get the 'notice details' info to display in a visual ? Many thanks in advance.