| | | Junior Member
       
Group: Forum Members Last Login: Wednesday, November 24, 2010 Posts: 6, Visits: 56 |
| | In a Skelta form, can you provide an example of how the Navigation URL on a Hyperlink control could be populated by a script? On the form, there would be several URL addresses in Text Controls. The Hyperlink Control would launch the web page listed in the associated text box. So if there were 3 Text controls, there would be 3 HyperLink buttons, one for each. The links in the text controls are entered in as part of a process. THe next question is, can I then populate the forms Text control with a workflow variable. The scenario is that the form is open via an Invoke form activity. On the form there is a button to populate the text controls. It would then pull variables from the workflow and put them in the appropriate boxes. Thanks; Rich Jones
Rich Jones (EMC) |
| | | | Supreme Being
       
Group: Forum Members Last Login: Monday, December 21, 2009 Posts: 102, Visits: 124 |
| | Hi Rich, This is Sri. Below are the responses for your queries: Q1. In a Skelta form, can you provide an example of how the Navigation URL on a Hyperlink control could be populated by a script? Ans>> You need to provide the required URl in the "Navigate URL" Property which is available under basic Tab for the Hyperlink Control (OR) You can provide the required URL in the value property of "Scripts" tab for Hyperlink control. The above method is static like the same page will be populated in every attempt. In order to make it dynamic, use any unique value by passing as query sting along with the URL. For ex: As per the attched jpg (Form1.jpg), we have a form and there is Title control which was set to current datetime using the below script. if(String.IsNullOrEmpty(Convert.ToString(CurrentValue))) { return Convert.ToString(DateTime.Today);} else { return CurrentValue; } So, we have used this control value as a query string along with the URL for the Hyperlink control. 'http://localhost/FormUploadControl/Home.aspx?TitleValue='+Control.FindRelatedRecordControlById(/*Title*/'f2427736882149b0b0279babc5f9adbc').Value 2.On the form, there would be several URL addresses in Text Controls. The Hyperlink Control would launch the web page listed in the associated text box. So if there were 3 Text controls, there would be 3 HyperLink buttons, one for each. The links in the text controls are entered in as part of a process. THe next question is, can I then populate the forms Text control with a workflow variable. The scenario is that the form is open via an Invoke form activity. On the form there is a button to populate the text controls. It would then pull variables from the workflow and put them in the appropriate boxes.
Ans>> In the workflow, before the Invokeform activity, use an updatevariable activity to update the workflow variables with the required data and use another update variable to assign the workflow variable to Forms controls (attached AssignVariable.jpg for your reference). By doing so, we are able to see the respective URL within the required textbox control on the form. Similarly we can even get it displayed as a Hyperlink. Attached are the supporting screenshots (DisplayedAsTextControlText.jpg, DisplayedAsHyperlink.JPG files for your reference) for this scenario. Hope these details will help you on achieving the scenario Thanks, Sri
Srinivasa Rao Pentapati
|
| |
|
|