Currently I use basic msi project in installshield.
I modify the destinaton dialog and add one checkbox on this dialog.
I want to use this checkbox's value in other place.
So how should I do?
Click on the checkbox you created in the dialog and you'll notice it has a Property and Value attribute. The Property is the name of the property that gets set when you check/uncheck the checkbox. The Property name should be in ALL CAPS to make it Public. It should also be listed in the SecureCustomProperties property to make it secure. ( Can pass from UI to Execute sequence during UAC/Elevated installation scenarios ) . The Value attribute says what the value of the Property is when it's checked. The unchecked value is always null/empty/unset.
If you need a different unchecked value you'll have to write a Set Property custom action that gives it a value when it doesn't have a value.
From there you can use it in other places ( such as Registry or XML changes ) by typing [PROPERTYNAME].
Related
I need to dynamically handle the object properties through code in my project as many of the object values are changing dynamically. So is there any way to parameterize object's properties in UFT?
To parameterize Object's Properties you need to Open your Object Repository in Object Repository Manager and go to Tools > Manage Repository Parameters and here you will get a window named as Manage Repository Parameters.
In this window click on "+" button and add Name, Default Value and Description of the parameter.
Till here you have successfully added the Dynamic Parameter.
Now to assign this parameter to an object what you need to do is just click on your object in which you want to use this property and then configure the value of required description property by pressing Ctrl + F11. Now from Repository Parameter window you can select "Parameter" radio box and select the property you added before and click OK.
After doing all these steps use this object in your code by just writing the below code and you are good to go with Parameterization of your Object.
Repository.Value("AddedObject") = "ValueYouWantToPassInRequiredProperty"
I have a managed action with returns bool when a button is pressed.
Depending on if true / false is returned I want to be able to change the properties of controls on the dialog. Not limited to just the text value.
Is this possible, for example the visibility, etc?
It is possible, however you will have to make sure there is a set-property control event (after your managed code custom action do-event) that touches a property related to anything you want the UI to update. If you change a property value within the managed code, or via the wrapper InstallShield provides, the Windows Installer UI doesn't track the change and update in response.
So, for example, you could wire your return value to the property RETURNVALUE, and then add a control event that sets better named properties like MYCONTROLTEXT or SHOWMYCONTROL; the control or its conditions would be wired to those better named properties.
How do I fetch the value of a checkbox in the installscript in Installshield?
Background :
I have a checkbox which has property "UALCSTATUS" and its value is "ON" .in the Dialogs section . When I fetch the value in installscript using the following command, it fetches 0 or nothing (whether checked or unchecked)
MsiGetProperty(hMSI, "UALCSTATUS", szStrValue, nVal);
Do I have to set a custom action when I check the checkbox so that I can set the value of "UALCSTATUS" property in order that it gets set to "ON" .
Properties tied to check boxes in Windows Installer UI are set to values that evaluate to true or false. While you can tweak the exact value used for true/checked in the CheckBox table, a simpler approach would be to call MsiEvaluateCondition with a condition string of the name of the property, and compare it with MSICONDITION_TRUE (1):
if MsiEvaluateCondition(hMSI, "UALCSTATUS") = MSICONDITION_TRUE then
: : :
endif;
Alternately for such a simple condition, you can just get the property as you described and compare it to an empty string. If it's empty, so is the check box. If it's set to anything else, the check box is checked.
As a side note, for a project using InstallScript-based UI, instead of checking properties, you'd be calling CtrlGetState to determine if the check box is checked. Typically this is then exposed through a byref parameter to the function that displays the dialog box.
I've spent days trying to figure this out and I give up.
I am a LotusScript programmer and have been trying to learn XPages. All of the examples and sample programs I've studied only touch on pieces of this.
Can someone explain to me step by step how to use the Selected property of the Extension Library Navigator control?
I have created my own custom control based on the layout control from the Extension Library and created a custom property called navigationPath. I also created a navigator custom control that has 5 Page Link Nodes. In the "Selected" property of each Page Link Node, I put the following SSJS:
if(compositeData.navigationPath == "/Home/ApplicationPool"){
return true
}else{
return false
}
/Home/ApplicationPool corresponds to the value I put in the "Selection" property of the particular Page Link Node.
In each layout custom control, I set the "navigationPath" property to compositeData.navigationPath.
What did I miss?
there is a selected and selection property and they mean very different things and can't be used at the same time. In the code example in your question above you are using the selected property which is the wrong one in this case.
Your treeNodes in the navigator should be setup to use the selection property, this is a RegEx value that is used to see if it matches the value passed into the application layout via the custom property.
<xe:navigator id="navigator1" expandable="true" expandEffect="wipe">
<xe:this.treeNodes>
<xe:pageTreeNode label="nodeName" page="/page.xsp" selection="/Home/ApplicationPool" />
</xe:this.treeNodes>
</xe:navigator>
As you can see you don't need to use any SSJS to evaluate a true/false outcome. Just match the value in the treeNode to the one in the XPage's applicationLayout control.
If your using tabs in the layout titleBar then you can set a selection property there also that uses the format /Home/.* which will make that tab highlighted for every XPage that have /Home/ at the start of it's navigationpath custom property. Don;t forget it is RegEx so any valid RegEx statement can be used here adding more power to this particular property.
For the tree nodes in the navigator control you define the name of the xpage to open and then the related selection. Example:
<xe:pageTreeNode page="/text.xsp" selection="/Home/Test" label="Test page">
</xe:pageTreeNode>
For the individual xpages using the applicationLayout you define a value for navigationPath. If this value matches an entry in one of the tree nodes the naviagor control, then the corresponding menu item will be highlighted in the browser. The best way to define the value of the navigationPath is by using a custom property (as you are using). Here's an example of that:
<xe:applicationLayout id="applicationLayout1">
<xe:this.configuration>
<xe:oneuiApplication navigationPath="${javascript:compositeData.navigationPath}" ...
You can see examples of using all this in the Extension Library Teamroom and Discussion templates.
Based on my explanation on how to use it, I can see that you are not using the selection property on the navigation control correct. You just need to define a unique value for each tree node (which then will be used if it matches navigationPath on the individual xpages).
So for your specific example change your selection property to just return: "/Home/ApplicationPool"
I wanted to put checkbox in my cognos 8 report based on some condition i.e if condition is true checkbox will appear with click mark and if it is not then without click mark.
I'm assuming you are placing this control on a prompt page...
It's kind of convoluted, but here's the only way I know how to do it. You can place 2 "Value Prompt" controls on your prompt page, and set the "Required" property to "No" on both. Set the "Parameter" property to be the same for both prompts (i.e., they will apply the same filter criteria on your query). For one of the prompts, set the "Default Selections" property so that your default value will be automatically selected on one of the controls. Also, be sure to set the "Select UI" property to "Check Box Group" (even if you only have one value to be checked) so you get a check box control.
Now that your controls are setup, you need to place them on your prompt page and apply a conditional render variable to both controls (you can look it up in Help if you aren't sure how to do this -- it's simple, but too lengthy to describe here). Basically, when your query condition is true, render the one with the check box clicked, otherwise render the one without. I not sure about the version support for the "Render Variable" property, but it works in version 8.4.
There isn't a way to my knowledge to dynamically select a default value on a prompt by linking it directly to a query -- You have to go through the conditional formatting/rendering approach.
yes i completely agree with jamey this is the only known way to do this.
there is another much difficult way to do it is by writing a java code which pretty much does tha same.
so i suggest you stick with jamey's solution.
as far as the version question comes, the 'render variable' property works the same in all versions of cognos 8 i.e. 8.2, 8.3 and 8.4.