Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
Pico
Partner - Contributor III
Partner - Contributor III

qualify command and using qualified name

Hi all, 

I just  learned about qualify function, and i'm trying to adjust a kpi changing only the (first) qualified name of the field.

Let me explain better: I have two tables: "Mail" and "Devices". both table have a field called "LoadingData". I'm using qualify in the load, so actually the two fields names are "Mail.LoadindData" and "Devices.LoadingData"

(cannot use the loadingdata field as a key) 

Moreover I have another table: TablesAnag, containing the two values "Mail" and "Devices". I'm using this field for filter panel.

Now. I would like to show  in a KPI the loading data depending on the selected field in the TablesAnag-filter panel.

I was hoping for thee kpi expression to be something like

'Loading data is :'&[ GetFieldSelection(TablesAnag).LoadingData]

in this way, if I select Mail in TablesAnag, i get mail.loadingData, while if I select Devices, I get Devices.LoadingData.

ofc is not working.  🙂 what's the right exdpression? Or is there a better way to do so?

Thank you very much

 

Edit:

The point is starting with two, then keep on adding new ones. 

I'm expecting to have 35/40 tables at the end

Labels (3)
2 Solutions

Accepted Solutions
Or
MVP
MVP

GetFieldSelections(TablesAnag) shouldn't be enclosed in quotes - it's a function returning a string, not a string in itself.

View solution in original post

Pico
Partner - Contributor III
Partner - Contributor III
Author

right,

so I tried

[$(=GetFieldSelections(TablesAnag)).loadingData]

and it works 🙂 

Thanks!

 

View solution in original post

6 Replies
Or
MVP
MVP

Given that you have just two fields, this seems like it should be simple enough with an if() or pick(match()):

If(TablesAnag='Mail',GetFieldSelections(Mail.LoadindData),GetFieldSelections(Devices.LoadingData))

Pico
Partner - Contributor III
Partner - Contributor III
Author

Thank you for the note. The point is starting with two, then keep on adding new ones. 

I'm expecting to have 35/40 tables at the end

Or
MVP
MVP

Would have been good to lead off with that... 🙂

The general case should be:

GetFieldSelections($(='Field' & 'A')) // This gets the selections for FieldA

Replacing the inner parenthesis section with whatever formulas required to get your field name.

 

Pico
Partner - Contributor III
Partner - Contributor III
Author

Yep, I edited the main question 😅

I'm not getting something, the problem is to have the result of GetFieldSelection within the name of a filed,
so if I try 

"GetFieldSelections($(='TablesAnag' & '.loadingData'))" 

does not work (Error in expression).

If I try

"[$(='(GetFieldSelections(TablesAnag))'&.loadingData] "

gives me no scripting errors but doesn't work either (always null)

Or
MVP
MVP

GetFieldSelections(TablesAnag) shouldn't be enclosed in quotes - it's a function returning a string, not a string in itself.

Pico
Partner - Contributor III
Partner - Contributor III
Author

right,

so I tried

[$(=GetFieldSelections(TablesAnag)).loadingData]

and it works 🙂 

Thanks!