Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Is it possible to create a free type box and then do a calculation with that field?
What I am thinking is creating a box which will be called discount which is a free type field. I then have a price column in the data base. I would like to create a new expression which will be the discount minus the price.. So 10 in discount box would be subtracted from the price field in my new expression.
I am thinking out loud so hopefully this makes sense!?
Hi!
I don't know if I understood it right, but what you're looking for is something like this?
Regards,
Gabriel
hola,
espero te sirva estos pasos
expresión de ejemplo:
=sum(campo3) - ((sum(campo3) /100) * Vejemplo )
saludos espero te sirva
create an input box object and then use the variable of that input box in your expression
Thanks for your help so far guys. Could i take this one step further and add a free type column to my table?
At the moment the discount column is being populated by a table in the database. Could I create a column within the table layout and free type the discount into it?
If this isn't possible i will just go with a free type text box which you have mentioned
Hi!
I don't think that is possible to create a input data column on your grid.
Regards,
Gabriel
Sure you can, but you'll have to create this extra column in your load script.
In your script, somewhere at the beginning, define an inputfield like this:
INPUTFIELD Discount;
When loading your data, a little further on in your script, add an extra field with the same name as the inputfield definition. You can load a global default value in this field (using a variable set in an input box) or you can load a value from an existing table using applymap.
When you show this field in a UI object (a Table Box for example), it will be changeable. See the INPUTFIELD help in QV Desktop.
Sorry to reignite this thread, but this is the correct answer. Thanks! I've read the help and in says you can edit this field in "list box cells, table box cells and in table chart expression", but I can't seem to edit it in a table box.
Should this be simple and I'm being an idiot?
Edit: I was being an idiot. Reading on further "A table chart expression cell must contain a Special Input Field Aggregation Functions to be open for input"
Better start a new discussion. You'll get a better focus.
Peter