Good afternoon. There is a business process with many tasks. In one of the tasks there are two association fields (for simplicity, let's call their field 1 and field 2). As when opening this task, check the value in field 1 and, depending on its value, hide or show field 2?
You can copy the OOTB free marker (.ftl) file for your control. e.g. selectone.ftl located at
alfresco-home\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls
then add JavaScript code to it to show/hide your fields.
Related
I would like to define a field, where there is a list of allowed values as well as give user the option to type it in. For example, I list a bunch of previous jobs that the applicant can have, plus have them pick other and fill it in as well.
Is it possible to do this with one field or do I need two fields where the user has to type it in? Is there a doc. or sample or tutorial I can look up? Thanks.
Here is a super simple Tags sample:
https://drive.google.com/open?id=0BxtQI4fTAVQqcUx4OUJfQ1JYV2c
To cover your exact use case you just need to:
Add logic to check if record already exists
1.1 If record doesn't exist, then create one
Create relation between records
If you don't care about duplicates in your database, then you can skip step 1 and always do 1.1 and 2.
I have a workflow to manage employee petitions, that starts with some fields at starter form. The next task, allows a responsable user to approve or reject the initiator user's petition.
I want to show the values of starting form into the approve/reject form, so I created a custom .ftl file for every field that I want print the label and the value. Now I have hard-coded the values to the this:
My problem here, is how to get the value from the first form and print it at the second form (values that I need are where says "200€" and my name).
I'm using Alfresco Community 5.1 and his own Activiti.
Thanks.
Solution 1 : keep IDs of the fields identical in both the forms. this will make the field editable in the second form.
Solution 2 : create a process variable, set its value after the first form has been submitted. then, in the second form display the value of the process variable.
I am looking for the best way to store information that is entered within an Oracle ApEx app that is sectioned off like a wizard.
Basically there are a number of fields on the screen, i.e. text box, text area, select list, checkboxes as well as radiogroup buttons but are not attached to any particular database tables.
What I would like to do is basically have the user enter required answers say on one pane, which might have 5 items in total, i.e., 2 textfields, 1 radiogroup, 1 selectlist and 1 checkbox and when they press the "Next>" button before going to the next pane, store these answers into a ApEx Collection against a particular Id and perform the same process on the following pane of answers entered.
I am using Oracle ApEx 4.1.2. Basically want to store away values on the fly and reuse at a later stage.
As I mentioned in my last comment above, Plouf came through with the goods. I didn't require an ApEx Collection after all - regular items did the trick.
I have created a Drupal website with a new page for registration purposes. I would like to have a checkbox list of my provided services (for example back-up user files), with the corresponding prices next to each service.
When multiple checkboxes are checked, the values (in this case, the prices) need to sum up to a total amount. This amount then should be displayed on the page.
How can I sum the amounts associated with the checkboxes?
You have the checkbox value attribute to attach the price amount to a checkbox?
While submitting/processing use js/php logic to add the selected checkboxes.
Update:
options array should be like this
array('return_value1' => t('Display Value 1'), 'return_value2' => t('Display Value 2'))
Look into the Computed Field module.
Computed Field is a very powerful CCK field module that lets you add a
custom "computed fields" to your content types. These computed fields
are populated with values that you define via PHP code. You may draw
on anything available to Drupal, including other fields, the current
user, database tables, you name it. (Feeling the power yet? :) ) You
can also choose whether to store your computed field values in the
database with other content fields, or have them "calculated" on the
fly during node views. (Although you should note that Views use
requires database stored values.) This field is literally the Swiss
Army knife of CCK fields. So start cooking up your PHP based values!
I have a form in which I am attaching a workflow to. The form has a number that will be auto-generated. For example the first number will be 1, the next time the form is opened the number should be 2, so on and so forth. The issue I am having is: in the Default Value under the Text Box Properties I have the Value as: count(mynumber QuoteNumber) +1. When the form is generated the first and only number is 2 the number begins at 2 and never increases. Can someone help me with this or explain what I may be doing wrong? Thank You. I'm not using visual studio.
Rachel: I have fought with this problem since InfoPath 2007. Here is how I do it.
Since you say you are attaching a workflow, I assume you are using the from in SharePoint.
1 - create your form library in SharePoint
2 - use InfoPath to design the form. When you publish the form to SP, make sure you promote AT LEAST the ID field you want to auto-inc. (I usually promote every field in my forms, 'cause I like to use them like SP lists.)
3 - In SP, create one new form and manually set the ID field to the starting number for your form series.
4 - return to InfoPath designer and re-open your form template.
5 - create a new data source to receive data from your SP form library and specify your form library as the source, and the ID field as a data element. Name the data source something like “ID Lookup”.
6 - open the properties of the field you want to auto-inc on your form and, in the default value box, select function, then choose the MAX function.
And add “+1” after the function to increment by 1.
Now, double-click in the field are of the Max function. You will see a dialog showing your form fields. Notice the drop-down at the top of the dialog – here you can choose the data source (notice I named mine “sales Contracts” in this example). If you select the data source you created in step 5, you will see a dialog showing you a couple of data branches.
Expand the ‘dataFields’ branch until you see the field you want to auto-inc. Click on this.
Your formula dialog will look something like:
max(ID_X0020) + 1
With your field name instead of the 'ID' in the Max function – the function will now return the Maximum value of the field IN THE FORM LIBRARY, plus 1.
Save the form in InfoPath and try previewing it. You will probably get a security warning – your InfoPath form is grabbing data from your SharePoint library on the fly. You may even get asked to re-enter your password (I usually do). When the new, blank form is displayed in InfoPath preview, you should see you ID field filled in with a value one greater that the number in that field of your SP library.
There is one huge Gothca with this method - if users re-open a completed form to edit it, the formula will probably try to replace the ID number. If your users don't edit the forms after they are submitted, the this will work for you.
Hope this makes sense.
You aren't doing anything wrong - you just have to change how you think about "forms" a bit. Remember a form is just like a word document template. Suppose you save a word document on your hard drive with a blank spot to fill in your name. Later you open the template, type your name, and save a copy as V1.doc. When you go back and open the template again - your name is not there because it was saved in V1.doc. Everytime you open the template you start again from scratch.
Infopath forms that you design and that the user fills out are templates (.xsn files). When the user fills it out and saves it they are really saving a copy which is only data (.xml files). The .xsn template doesn't change when users interact with it.
So to answer your question - there is no way directly in InfoPath to cleanly keep track of an auto incrementing ID. You will need to tap into some code (webservice, sharepoint, etc) to do that. You could also consider making the ID a GUID (which infopath does support) but it won't be auto incrementing and it won't look "clean" if it has to be displayed/used by real people.