Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
MarcoARaymundo
Creator III
Creator III

How to load an inputfield with the result that a variable

Hi,

In my load script I created a inputfield type field.

Ex inputfield inPrecoImpII.;

In the application there is a variable that returns a formula.

Ex.

If (Ref = 'AVGCliente'

     If (Rule = '>',

          If (KeepChar (vValorInf, '%') = '%',

               'Avg ({<= $ Promo :: Promo>} PREÇOCV) + (Avg ({<= $ Promo :: Promo>} PREÇOCV) * vValorRef)' ,

               'Avg ({<= $ Promo :: Promo>} PREÇOCV) + vValorRef'

          ),

          If (Rule = '<',

               If (KeepChar (vValorInf, '%') = '%',

                    'Avg ({<= $ Promo :: Promo>} PREÇOCV) - (Avg ({<= $ Promocionado :: Promo>} PREÇOCV) * vValorRef)' ,

                    'Avg ({<= $ Promo :: Promo>} PREÇOCV) - vValorRef'

               ),

               'Avg ({<= $ Promo :: Promo>} PREÇOCV)'

          )

)

I need a formula variable is "inserted" in inputfield field as a result.

Without using inputfield everything is working, however, the client wants the ability to change the results.

I want to avoid using macros.

Any idea?

tks Marco

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can't use set analysis in the script. That means you can't calculate the value with that expression in the script and load it in the input field. And only a user can change the value of an input field in the UI. But perhaps a macro works. See this document for an example: Use a macro to update InputField. I doubt that will work in the ajax client though. Another option you can explore is using a Dynamic Update action: Dynamic Update - Using Actions.


talk is cheap, supply exceeds demand