Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to imbed an input box in a grid?

Hi, I have a problem. I have a request to allow users to input values that will manipulate records in a grid. Lets say I have 3 columns, and the first is a value from an sql table. the second column needs to be a input box, where upon entering a value, the third column will provide a result by multiplying the two. I have no idea how to go about doing this. Is this even possible? and if so, are there any examples?

Thanks

8 Replies
p_verkooijen
Partner - Specialist
Partner - Specialist

Try using Inputfield, see attachment

From the helpfile:

Inputfield

A field may be flagged as an input field by listing it in an inputfield statement before it is referenced in any load or select statements.

Input fields behave somewhat differently from regular fields. The most important difference is their ability to accept changes in field values, interactively or programmatically, without running the script. Field values must be loaded into the field via load or select statements. Each field value loaded in the script will create a placeholder for a field value replacement value. Only existing field values can thus be changed interactively or programmatically. The replacement value is user dependent, i.e. when an input field is used on a server, different users will see different sets of input field values

In input fields all field values will be treated as distinct, regardless if several have the same value.

The syntax is:

inputfield fieldlist

fieldlist is a comma separated list of the fields that should be flagged as input fields. The wildcard characters * and ? are allowed in field names. Quoting of field names may be necessary when wildcards are used.

Examples:

Inputfield B;

Inputfield A,B;

Inputfield B??x*;

Not applicable
Author

I am not sure about a input column available, but you can create a input box and then use the variable in the expression to show the value, which is entered by user.

Or if it is matrix like multiplying with pre-defined numbers, then create a list box with that list and use that field to multiply.

If you could attach a sample app, then workarounds can be implemented.

Thanks,

Singh

Not applicable
Author

Wow, so if I understand you correctly, in order for me to have an input column, I have to bring in some dummy column with a value I don't even need. This sucks. All I want to do is provide a place for a user to input a value in any point of a table. so using my example, I have to import the same values into column1 and 2, even if what a user would be importing into column 2 has nothing to do with the values coming from value 1?

p_verkooijen
Partner - Specialist
Partner - Specialist

David McEachern

You can also create (multiple) inputfields using the existing fields from your dataset.

The default value of the inputfields would be the data loaded.

In the example I've added a field with default value 0

Not applicable
Author

Ah okay I see many thanks. Now what if I am qualifying my tables... does that change how and where I defne the input column?

Not applicable
Author

Ok I figured out out to get the column in, however, when i select the column to enter something in it, it just sorts it. its not editable...

p_verkooijen
Partner - Specialist
Partner - Specialist

if you want to edit the column use inputsum(fieldname), see the attachment of my first reply

Not applicable
Author

Hi Paul, I did look at that, bu tthe problem I have on my end is that the column has 1s or worse, a count of how mnay times that similar record appears in the table. For example, if i had name, and account number, and my input column, and the same name appeared 3 times with 3 different accounts, a number 3 shows up. All I want is 0, regardless of what is happening in the rest of the table. Even though I am setting the default value to 0 in the load script, it gets over-written with this count when the data is loaded into the table. I am about to rip my hair out.