I'm trying to initialize a task form (in my workflow) with values contained in my infopath form (the global one if I could call it like this ^^).
For example, I've a worflow which is activated on a command from a client. The first task is assigned to the client, he has to fill in a form with some values (command name, adress, ...).
Next, I save those values to my "global" infopath form. It works.
After that, I create a task for the command manager who get a summary of the command and he has to validate it or not. In this form, I want to retrieve values from the global form. This is the problem.
I tried to use a data connection on the global infopath form and set the default value of the field in the task form. For example, the command name : #CommandName. And it doesn't retrieve any value...
I don't know if you need more information and if you guys understand my question cause it can be a bit confused. So don't hesitate to ask me question to clarify.
This issue is solved now.
My workaround :
Define a Content Type for each fields.
Add extended properties to the task with the name of your field :
myTaskProperties.ExtendedProperties["myFieldName"] = "my expected value";
This is the way to pre-fill your form by the code.
To retrieve data from your global infopath form :
I've a method which do that. This method is going to read the xml (my global infopath) and get the value. After that, I add this value instead of "my expected value" above.
If you want more explanation or code, don't hesitate to contact me.
Related
I have a lot of Forms, and in one Form I use printing. All other Forms can call this printing Form.
In addition, every Form has different objects, some of them have TDBGrid and Filtered option, and some of them don't. I tried to check before printing if there's a Filter. I did some code and I get a result, but this didn't work with all Forms because every Form have a different name, as everyone knows.
My question is, how to know which Form clicked the printing button and use it?
//on form is 1
form1.dbgrid.somecode
for second form
form2.stringgrid.somecode
How can I know which Form, and can I save the object's name in a table in the database?
I'm trying to add new field in SugarFields and i have many problems. I have to create a new field which is combination of relate field and multienum, when user clicks to select one/many item(s) the list will be loaded to dropdown list (multiselect). I have copied and modified relate field but i can't see how to get data from pop-up window
Have anyone tried this before? Please give me a clue. I'm using SugarCE-6.5.13
Thank you.
I can't upload image so this is a link from mediafire :(
http://www.mediafire.com/view/523c1kwewld18hn#
You do not need to create a custom field. What you actually want to do is add some custom JavaScript that will make an ajax call to the server to obtain the values for the multi-select from the relate.
There are two different types of data for a relate field. Data when you type ahead and data that is returned from a popup.
For the popup: you will need to override the function set_return(popup_reply_data)
I can't remember off the top of my head, how to handle the type ahead.
How can we pass a list from JSP to the action in Struts 2?
The list is a list of strings set from the same action when the JSP page gets loaded (there is a hidden field in the JSP which is being set).
All that I need is when again the form is submitted and the control goes to the action, I need that list again.
Make an array of strings and submit it using json or make a # seperated string of all strings and associate it with some hidden variable and submit it to action class. then in action class you needs to parse it back to original form.
you can use the hidden tag name attribute to refer to the list name that is being used in the class. Now when the form is submitted it will automatically map to the list in your action.
You need to have list as your instance variable in the action class
If you are setting a single hidden field with the contents of a list then you'll need to parse it back into a list again. Whether or not this is a good idea depends on the contents of the list, and how good you are at parsing.
Another option is to use Struts 2's default list-building mechanism and use multiple hidden fields and OGNL's array notation, e.g., name="foo[0]", name="foo[1]", and so on.
I'd start, however, by examining the need to reconstruct the list from the JSP like this.
If you're just serializing/deserializing the same list, why bother? Either keep it in session, or reconstruct it on the Java side. If it's backed by a DB then your caching mechanism should reduce any overhead.
I'm new to Delphi7.
When I try to use the editor's "Add all fields" feature on a TClientDataSet object a messagebox (the classic error message box) appear with the message "No value for parameter '(the name of the parameter)'".
I can't add fields using the "all fields" feature anymore.
How can I find the source of the "No value for parameter" error?
The problem is (most likely) that the ClientDataSet is not filled with any data.
Lacking data, no fields can be listed.
Do the following:
put a connection on the form. [connection1]
Connect it to a database fill in login, password, database, and whatnot.
Make the connection active. (only possible if all the connection parameters are filled in correctly).
put a table on the form. [table1]
Set it's connection property to connection1.
Set the tablename property to a valid table; set active to true.
Put a datasetprovider on the form. [datasetprovider1]
Set the dataset to table1.
Put a clientdataset on your form [cds1].
Set the providername of cds1 to datasetprovider1.
Set cds1.Active to true
Now you can select fields, because now the cds holds actual data.
I managed by myself. The TClientDataSet object had a parameter with DataType and ParamType properties both set to Unknown. Setting the parameter with correct properties solved the problem, I was able to "add all fields" again. Thanks for the answers.
I don't think any data is necessary to do what you want - and the first answer provided does not seem to include data, even though that is the original statement. You should be able to add all fields so long as you have a connection to a table, query, stored procedure or something similar.
Your question says there is no value for a parameter, and shows which parameter - although you don't say. But it is probably the parameter for a query or such. That query is failing because you are not providing a parameter, therefore you don't get any results. Of course this includes no fields.
Check the parameter in the error message.
Im trying to perform update of some records.
When im calling a create action after i insert the record i take out some of the records and change a non-primary key value. Then i call UpdateModel on each to try to save them.
But i get error: The model of type "" was not successfully updated.
If i check ModelState i see that the id value (wich is PK and IDENTITY fails -> A value is required.). The value at id isnt there.
What am i doing wrong?
Hard to guess what the reason might be, but if you trigger the whole thing from a form, I would do "view source" of the html form and make sure your id is there (in a hidden field?). Maybe you forgot to set the id property in your viewmodel before passing it to the view?
That's my best guess without seeing some sample code :)