Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I've a variety of question about the interface:
***** First:
I've a list object and there's a value in it that I need to be select by default even when the clear button it's pressed (not vital but I'd be good).
Only if any of the other options of the list it's selected or the default it's pressed again (to deselected it manually) that list could have other option.
I think I've to use a macro for that, but i'm not sure.
***** Second:
I use the Actual Selections object, and by default the first column it's the name of the field, is there a way to take off that column??? and leave just the one with the values?
***** Third:
The grapics have the choice of show a pop-up with a resumen of the values of the expressions in a point. If i have 3 diferents expresions (lines in my grapich) and I put the cursor over one it gives me the results of the 3 expressions but only identify with the name the one where i'm standing on, for the other ones it show me the value but not the name of the expression (I know it follow the order of the leyend but I need the name of the expression)
Thxs in advance.
You can use the onSelect event of the field and a macro to handle it. Something like this for a macro:
Sub SelDef
set fld = ActiveDocument.Fields("Field")
If fld.GetValueCount(1) = 0 Then
fld.Select "Default"
End If
End Sub
I've attached a sample app.
NMILLER, Thxs a lot! It works perfectly...
I need to modify a little your code 'cause I need a default in that list as long as another option in a list object haven't been selected.
So, in order to get that, what exactly GetValueCount(1) = 0 means??
Have your any idea to the others enquiry i have??
Thxs!!
Did you edit your post? I only remember reading the first part.
GetValueCount(1) means how many items are selected. It means if nothing else is selected, which will happen on a clear or when the last value is deselected. I don't understand what you mean by as long as another option hasn't been selected. If no other object is selected, the Count will be zero and the macro will make a selection. What is the situation where this is not working?
For number two, do you mean a Current Selections object? I don't believe you can get rid of the Fields column. In fact, on the Current Selections options, it says the Fields object is always shown. If you just want to display the selected values, use a Text Object and give it the value:
=GetFieldSelections(Field)
I'm not sure about the third question. I'm not really following and it's hard to visualize what you mean. Perhaps you can provide an example?
Yes, sorry... I was editing it while you were answering!! I think...
Ok, explaining myself better about the "first".
I've a list of enterprises and another list (let's call it B) that's the one with the default value. So, if one specific enterprise it's selected I want that the list B have no longer the condition of default value and while that enterprise havent been selected then the list B must have a default value.
About the "second": I'll try your recomendation.. it's a shame for me that about the field 'cause I dont want the user see the name of the fields (must of them are qualify and could be hard to understand for them)
About the "third":
As you can see i'm standing on the blue line (Bultos Facturados) and in the pop- up it shows me the name (Bultos Facturados) but with the other values (22083 and 7953) dont put the name Bultos Cotizados and Meta.. and I need it 😕 you know.. a client requierement..!!!
Thhhaaaaaaxxxssssssss
Oh, so if a value is selected in another field, then the default doesn't apply? Check out this sample.
Yes, the GetFieldSelections is probably what you want. If you don't want to show the field names, then it should work fine and you have more control over the look of a Text Object.
I'm not sure about 3. I haven't done much with those chart pop-ups, but I'll take a look.
Thxs, I checked it out... I'm trying to modify it 'cause I need to know which value of the list with the enterprises has been selected. If the value it's "Enterprise1" then dont apply the default value, in order to have no selection in that list.
Can u recommend me a manual? for me to look for the methods and properties of Qlikview object...!
About the GetFieldSelection, it's a good idea even though I can not use it in this project..
Thxs for all... I really appreciate your disposition..
You can pull the selected value in your macro.
...GetSelectedValues.Item(0).Text
Use the API Guide. It is installed when you install QlikView, but it is also available for download: http://global.qlik.com/download/
Ok!
I'll check!
Thxs a lot