Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one Input Box and one Button(Save).
Now my requirement is when user enter any name and click on 'save' button the name should be saved.
and when he enter name I want only character will be accepted (not any number and not any special character).
And previously saved name will be display in Input Box when we click on Down Trangle sign in Input Box.
Please help...............
Find Attachment for more clarification.
Where do you want the value saved to ?
1. To the variable
- this is done anyway, though make sure you don't reset it in your script. Persistence may be a problem on client-server, but I think it should save a version of variable for each user
2. To the datamodel
- I don't think you can do this, other than saving to an extrnal source (see 3 below) and then loading it back in to the datamodel on relaod
3. To an external file source
- can do this via macros. Try this code taken from the API Guide with Class of "InputBox" and Member of "SendToExcel" ... the commend suggests it might only work or charts though
rem *** This method is only meaningful for charts and table boxes ***
set obj = ActiveDocument.GetSheetObject("CH01")
obj.SendToExcel
Jonathan
Hi Jonathan,
I tried to save name in excel but when i clicked on save button every time it opened one new excel file.
And also it not taking the name which I entered through the Input Box.
If you have any idea then plz share qvw file.
Thanx in advance...
Hi,
I created one sample application by using macro to achive your requirement,
you need to change path in macro.
I hope this will help you.
Thanks
Nice Work . . .
Hello Raj,
First I want to tell thank you for your help.
Raj I have 2 more requirement 1) when I enter any name and click on save button it didn't allow any special character and number.
2)Already saved name I want to display through Input Box. If you go Input Box properties---> Cnstraints tab , under Value List Box there is one radio button "Predefined Values in Drop Down".
Hi Amit,
To add a drop-down selection to an input box,
go to Input Box
Properties >
Constraints >
Value List >
Select 'Predefined Values in Drop-down', >
Deselect 'Enable Edit Expression Dialog' >
Select 'Listed Value' >
Enter values separated by a semi-colon
Raj but I want to display those values which we saved into text file.
ok Amit,
There will be one option,
I am not sure about it but we can add these values by using Macro while saving into file.
Good work! But any idea how to retrieve the saved data, when user reopen qlikview?