Hi everyone wonder if anyone can provide pictures or the exact steps pertaining to how to locate the "validation expression according to this link https://helpx.adobe.com/experience-manager/6-3/forms/using/adaptive-form-expressions.html#main-pars_header_3
Also while you are here I am wondering if it is possible to use these validation tools to check if the income is greater than the cost. i.e the user have to key in a higher value in the income numeric box as compared to the cost numeric box. If not providing a guide that allows me to do this would be great.
Many thanks in advance!
The validate expression is written using the Code editor of the rule editor. For e.g., I've created an adaptive form with 2 Numeric Boxes (Income and Cost) as shown below.
So, to validate if the value entered in the income is always greater than the cost, then click on the Income field and then click the Edit Rules icon. This will open the rule editor
Once in the rule editor window, click on the Income field on the left rail and then click the Create button.
In the Create Rule window, you can use the Validate event and configure the required condition.
You may also need to write a similar condition on the cost field as well, but in reverse (Cost is less than Income) so that when someone changes the value in the Cost field, it is validated too.
As far as your original question goes, if you switch to the Code Editor, it should give you another editor where you can write Javascript to validate the value. The validation expression from your documentation link goes there (see below).
Related
I want to use conditionnal data validation in google spreadsheets for let's say cell A1 based on a custom formula to check wether a user entered a formula or some random value that should be rejected.
Here is the custom formula for the data validation: =ISFORMULA($A1)
Here is the test formula I enter in cell A1: =ROW(D4)
and here is the other value I enter that should be rejected: a
So one is a formula the user should be able to write and the other a value a that should be rejected.
I get weird behaviours, sometimes the error message pops up, sometimes don't and even when the cell contains a formula I get a text attached to the cell telling me the value doesn't meet data validation's criteria.
Here's the spreadsheet link
After some investigation with JSmith it looks like some bug in GS. If your custom formula is self referencing and is using:
=ISFORMULA(A1)
to make it work you have to change "On invalid data" to "Show warning" (not "Reject input"). Its weird but works (but you have to live with red triangle).
Other tested formulas seems to work...
Any help would be highly appreciated.I am working on Nintex form and currently stuck with this rule to be worked.
I have first checkbox as YES/NO (Name: NA), trying to create a rule where automatically all the options (Name:Options) below automatically go uncheck when somebody clicks on this first "Not Applicable". If it could hide all the below options after clearing that would be great but not requirement. Definitely clearing them out is requirement.
Is there anyone who can help me with this. Thank you.
It would really help to see some screenshots of your form and it's controls.
However, I can tell you that a rule will not be able to change the values of another control. For this, you're going to want to use JavaScript in the Settings -> Custom JavaScript section.
I will often show/hide a portion of a form based on the selection of a control. And, when the section is hidden, I always want to clear out any data that may have been entered into those (now hidden) fields.
Here's an example:
Image of Form Example
And here's the code:
NWF$('#' + myYesNo).change(function(){
NWF$('#' + myChoices + ' input').prop('checked',false);
});
Every time the Yes/No field is checked, everything in the Choices field is unchecked.
I would also suggest adding a rule to the Choices field (and its label) that says not(myYesNo): like this.
If you didn't want to hide the choices, I would expand the JavaScript to test whether or not the Yes/No is currently true or false. However, hiding the choices entire remove the need for that test.
Scenario, I have a field with 20+ possible values where the user needs to select 1, if I render all 20+ the screen scrolls up degrading the user experience.
Ideally, I would like to present 10 items at a time and an extra button so the user can select "more" or "next"/"prev", does anyone have a reference implementation on how this can be done in formflow?
(I guess it involves some validation and reprompt logic where I update the underlying values for the selection but I'm not sure how to go about it)
Thanks
I have not tried this specific scenario, but I can think of two ways to do it.
You could split your field into two fields, i.e. one which has an
enumeration of the first 10 and a "more" choice and then a second
field with the next 10. The second field would be conditional on
the first field having a "more" value. This is the simplest method.
The second way would be to make use of PromptAsyncDelegate and ValidateAsyncDelegate. The PromptAsyncDelegate would split up long lists of results to add a "More" button. You would write a ValidateAsyncDelegate which on "more" would return a ValidateResult that says the value is not valid and which has a FeedbackCard in it with the second batch of buttons. You could either build it in the code or you some private state to pass the extra buttons.
Please let us know which approach works best for you.
I have a report with many tables (tablixes?), in which I need to hide all rows that don't have a value in the 2nd column:
I can do this by right clicking on each row
and setting an expression for the visibility of the row that depends on a value appearing in the field of the 2nd column, e.g.
=IIF((Fields!MyField4.Value = ""), True, False)
But the problem is that my report has over 1000 of these rows! It will take a very long time given that each field has a specific name! I can modify the Xml, but this will also take a while. I am currently writing some code, which uses XDocument, to achieve this.
Are there any faster ways that anyone can think of? Maybe something from the designer, or some VB code? Everywhere on the internet seems to suggest right clicking one row at a time.
In the Designer, select all of the rows (using your Shift or Ctrl key), and use the Properties pane in VS/BIDS to change them all at once. There is a Hidden property there, and you can choose Expression from the dropdown in it. From there, you can apply the IIF to all rows.
Of course, I am assuming all of the visibility is based on the exact same expression for each row. If not, then the answer is no. Unless, you want to start doing some copy/paste stuff in the RDL XML, which I do not recommend.
Is it possible to use the default ComboBox control under VB6 to make it a smart ComboBox?
We suppose that the values are already populated in the ComboBox. For example:
New Delhi
New World
New York
We need the ComboBox to respond to one of the default events, so when for example the user writes 'N' the value in the ComboBox will be the first Value starting by 'N'. In our case it's New Delhi and then the user can continue typing till they write the exact word or he writes something different.
This technique is very used in web Application (for example in Google when you put the first word you will get a droped down list containing the suggestions).
But how to do that in VB6 :-(
In case its not possible, how can we keep the ComboBox droped down, the values changes when the text in the comboBox change and the first element in the ComboBox correspond to the first word starting by the value entered by the user?
Thanks a lot.
Actually I found an easy solution :) thanks to FreeVbCode uder Forms&Contorls Tab. There is a control named AutoControl. We can use it easly for our requirement.
http://www.freevbcode.com/ShowCode.Asp?ID=5944
Thanks.
You might also want to look at this control from vbAccelerator.com, which supports auto-completion. The vbAccelerator code is usually high quality. Of course you're introducing quite a dependency into your code whenever you use a third-party control.