Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi there, when there are multiple columns mapped in the same fields panel, like that
in the metadata -> columns -> rolesIndex a vector is created containing the index of each field
But in the interface of the API this not acessible. I checked the DataViewUtils (Introduction to use Data view utils in Power BI visual in Power BI embedded analytics for better emb...) , but its just help to find the specific role in different fields.
How i get that specific property named rolesIndex in my code?
Thanks.
Gabriel.
Solved! Go to Solution.
Hi @Anonymous,
I would say that if you want a supported way to do this, then it's probably better to make a request in the repo for the feature.
A hacky workaround would be to refer to it explicitly like this, but it's going to get resolved as an any type, and you may need to write some safety checks around the object properties in the chain, otherwise your visual will potential experience some unintended side-effects:
dataViews[0].metadata.columns[i]['roleIndex']['statusImg'][0]
It might be worth stepping back to see if this is absolutely the way to solve what you are trying to do though - perhaps if you can share enough info and code around what you are trying to achieve, along with some sample data then perhaps we can take a look at a more supported approach?
Ragards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @Anonymous,
I would say that if you want a supported way to do this, then it's probably better to make a request in the repo for the feature.
A hacky workaround would be to refer to it explicitly like this, but it's going to get resolved as an any type, and you may need to write some safety checks around the object properties in the chain, otherwise your visual will potential experience some unintended side-effects:
dataViews[0].metadata.columns[i]['roleIndex']['statusImg'][0]
It might be worth stepping back to see if this is absolutely the way to solve what you are trying to do though - perhaps if you can share enough info and code around what you are trying to achieve, along with some sample data then perhaps we can take a look at a more supported approach?
Ragards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |