13 Replies Latest reply: May 29, 2013 8:21 AM by Michael Richter

# Using functions in set expression

Hi all,

I want to use this formula in a textbox, but it does not show any data. Do you have got an idea?

```=concat({<KPI_Category_Name=\$(=SubField(concat(KPI_Category_Name,';'),';',1))>} KPI_Name, ',')
```

I tried the inner formula

```=SubField(concat(KPI_Category_Name,';'),';',1)
```

in a textbox and it gives me the right value.

Thanks for any kind of help!

Regards

• ###### Re: Using functions in set expression

Try: concat({<KPI_Category_Name={"\$(=SubField(concat(KPI_Category_Name,';'),';',1))"}>} KPI_Name, ',')

• ###### Re: Using functions in set expression

Worked fine, didn't know that combination. Thanks!

• ###### Re: Using functions in set expression

I thought I understood it but I actually didn't...

What if I want to use this new value in a set expression?

My try:

```=if(maxstring(<{KPI_Name={"\$(=subfield(concat({<KPI_Category_Name={"\$(=SubField(concat(KPI_Category_Name,';'),';',1))"}>} KPI_Name, ';'),';',1))"}}> Statusname)='green','qmem://<bundled>/BuiltIn/led_g.png','')
```

Thank you very much!

• ###### Re: Using functions in set expression

Hi everyone,

this is my KPI-Name (which totally works in a textbox) :

```=subfield(concat({<KPI_Category_Name={"\$(=SubField(concat(DISTINCT KPI_Category_Name,';'),';',4))"}>} KPI_Name, ';'),';',1)
```

I now want to get the Status in this KPI-Name so I need to use it in another Set-Expression which I am not able to create

This has to look like

```=maxstring(<{KPI_Name="{\$(=subfield(concat({<KPI_Category_Name={"\$(=SubField(concat(DISTINCT KPI_Category_Name,';'),';',4))"}>} KPI_Name, ';'),';',1))}"}> Statusname)
```

... or anything like that but I don't know.

Thanks for any kind of support!

Regards

• ###### Re: Using functions in set expression

Doesn't work

• ###### Re: Using functions in set expression

HI ,

Try this below code  small change to your expression .

=maxstring(<{KPI_Name={"\$(=subField(concat({<KPI_Category_Name={"\$(=SubField(concat(DISTINCT KPI_Category_Name,';'),';',4))"}>} KPI_Name, ';'),';',1))}"}> Statusname)

Regards

Yusuf

• ###### Re: Using functions in set expression

It says expression OK but doesn't show anything...

• ###### Re: Using functions in set expression

Perhaps for that Filter no data is shown .

Can you try using some other value for the Filter(Fields)  in the Expression .

Regards

Yusuf

• ###### Re: Using functions in set expression

I have created a table which shows that there is data for this field so there has to be a value..

• ###### Re: Using functions in set expression

hm, this doesn't work and gives the KPI_Name but I need the Statuscolor (like shown before)

thank you for trying.

still got no solution

• ###### Re: Using functions in set expression

I think this doesn't work like this so I just created an example app.

The red one has to show the statusname of Cat1 - KPI1 , flexible without writing 'Cat1' or 'KPI1' into formula.

Thanks.

• ###### Re: Using functions in set expression

See attached qvw.

• ###### Re: Using functions in set expression

It's great! Thank you very much!