add letter to input with v-model - vuejs2

I need to add a letter in input always to begin with '&' this input has v-model that not related to the data in v-model
so for example the input value will have to start always with & then some string that is coming from the v-model. the input might already has the & in the beginning and if not will have to be added
example:
input has
v-model='helllo'
value in the input needs to be : &hello
i tried to use value='andText' but it doesn't seem to do the trick where andtext='&'

Related

When setting a date with v-date-picker v-text-field is not populated with selected date when v-mask is used

Has anyone seen/solved this issue? I have a component that utilizes v-date-picker and v-text-field. The text field is using v-mask for dynamic masking. The masking works well when date is typed in. However, when the date picker is used, it causes the text field's contents to be updated multiple times and the functions used to construct the mask are called multiple times as well. As a result, the text field ends up blank, and I get an error stating that time value is invalid.
I understand that the date picker is performing its own checks, and the format it's using for dates is different from what I need. I tried a workaround to limit the number of calls coming from the date picker and populate the text field with a saved value at the last call. But I either still get a blank field or the 'invalid time value' error.
When I set breakpoints in the masking functions, I do see the date in the text field before it disappears.

Entering ! (exclamation sign) in the OBLIGATORY parameter doesn't work as input. Why?

Suppose we have following selection screen:
PARAMETERS: d_char OBLIGATORY.
WRITE d_char.
When the user enters ! in this field of selection-screen and runs the program, it still prompts for required entry in this field.
Why?
You can find the answer in the documentation for Dynpro Fields.
When dynpro fields are received from input fields on the screen, input fields are templates that expect a certain format depending on the data type of the underlying dynpro field. When passed to the dynpro field, the input is converted to a value of the appropriate type. This also means that some characters function as special characters by default.
The "!" character in the initial position of an input field on the screen deletes all characters in the field before the data transport.
The "=" character in the initial position of an input field on the screen initiates a search using search helps.
If an input field contains only blanks and "_" characters, the latter are transported as blanks.
To deactivate the template and also the modifying effect of special characters, the attribute Without Template can be activated in Screen Painter. However, the template cannot be deactivated for selection screens.
Define the parameter as TYPE STRING and you will receive the ! as well as the = or even a space.

Variable in Generate Rows step in PDI

I want to use variable in 'Generate rows' step in Pentaho. How can i use it. I want to give a file path in a 'Value' field but that should not be static so that i can pass this value into my csv input.
I am not sure to understand your question (see #mat's comment), but as far as I can understand it, I wonder if you really need a Generate Rows.
The CSV Input File can read the file name from a variable. If you look near this field you'll see a small 'S' in a blue diamond shape. It means that you can put a variable in it, in the format ${var_name}.
This suppose that your variable is indeed a variable, as opposed to a field. You can get the list of variables by pressing on Ctrl+Space on any input box near the 'S' in blue diamond shape. You can add a variable either in defining in a previous job, either in the parameter list [Right-click anywhere and select Parameters], either by editing the kettle.properties [on the top menu Edit], either by specifying the variable value on the small panel that is presented to you each time you want to run a transformation.
With a Generate Rows, you define a field and there is no way to use a field for the filename in a CVS Input file. You can however use a field in a Text file input with the Accept file name from an other step check box, and telling spoon from which step and from which field. If you use this step, specify on the Content tab that the filetype is CSV.
you can use "for" javascript lang step and get variable to generate rows,

access forms: forcing UCASE in a textbox

i would like to force the textbox to immediately change the text to UCASE as soon as the user moves away from the field. is this possible?
the important thing is that this text will be used in a SQL query to update a table.
In the after update event of the text box on the form, simply go:
If isnull(me.MyTextBox) = false then
Me.MyTextBox = ucase(Me.MyTextbos)
End if
You can also specify a input mask on the form.
">LLLLLLLLL"
The above ">" will force all chars as you type to upper case. The number of L is a any char mask. (and, you don't need the " around the input mask)
Solution from Albert don't work for me.
I use this method: put form in "design view", select the control, in the property sheet, in the format tab, in the format property insert the value ">" w/o quotes.

Logic to Correct an Incorrect User Input (VB.Net)

I am looking for logic that converts an incorrect user input to a correct integer input.
For example, a user might mistakenly type in letters within an integer input and the logic changes that input to the correct form(integer).
Any ideas?
If you want only numeric values, you can use a numeric control instead of textbox (NumericUpDown if I remember correctly). Otherwise, you can listen to the OnKeyDown or OnKeyPress event, "see" what's inside the argument (the key typed by the user) and eventually change its input. For instance, I'm in Italy and often users use . or , for decimal separator. So I translate dot to comma while the user types. Also, when a non-number is typed, I set e.Cancel to true so nothing is appended to the text displayed.
For typing errors, a BK tree is often used, in conjunction with Levenshtein Distance. Here is a good explanation on how this is applied.
Why would you correct incorrect input? You would want to prompt the user to re-enter the information correctly and tell them to enter an integer.