filter method getFieldAsync does return 401 on super store example
See original GitHub issueDescription
I have faced an issue where I wanted to get the field that was used for a filter. For this I found in the API reference this method getFieldAsync(). But instead of returning the field object, I always get unauthorized response, even though everything else from the API does work.
What I am using
Workbook: SuperStore - Shipping
My implementation
export async function getColumnRoles(worksheet: Worksheet): void {
let metaInfo: any = {};
const filters = await worksheet.getFiltersAsync();
console.log(filters);
// This gives me the error
console.log(await filters[0].getFieldAsync());
}
Request (simplified)
Request URL: [...]/w/Superstore/v/Shipping/sessions/A3093F7D1A1D4B409E9D8146FC983557-0:0/commands/tabdoc/get-datasource-pres-model
Request Method: POST
Status Code: 401
Remote Address: [...]
Referrer Policy: strict-origin-when-cross-origin
My goal in the end is to find out whether the filter is assigned to a field which is a dimension or measure
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Return HTTP Error 401 Code & Skip Filter Chains
If you return from the method after setStatus that stops further processing of the request. The filter chain only proceeds if you call...
Read more >Managing Server User Filters With A Dedicated User File
User filters on Tableau server are an excellent way to control individual access to certain information. These filters may be applied to specific...
Read more >Untitled
Do -35 package dimensions, 3ds qr codes gold pants, Greenray inc, Romanian wasr ... Mustafa karahan randevu, Aeon mall phnom penh supermarket, Global...
Read more >Untitled
Hemmemawei, Fantozzi pantaloni ascellari, Do it shia palpatine, ... Getfileasync example, Male police officer costume, First direction concert, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still getting a
401
on the latest extension version1.5.0
. I am using exactly this code snippet:Hello @LingVuDev We have recently found and fixed an issue with Filter.getFieldAsync(). It will be fixed in our upcoming 1.5 version of the extension library (coming in Q2). Meanwhile, the only work-around would be to use Filter.fieldId, and look up the field in DataSource.fields. From that field, you can get the role. John