Get reset value of field in vr_ad (specman) or simply reset the field - uvm

I'm running a sequence where I need to temporarily write to a certain field in a register, and after a while I wish to reset it back to its reset value. I don't want to reset the entire register using the reset() function, I wish only to reset the field. I couldn't find an easy way to access the reset value of the field itself, even though it's defined per field in the reg_fld macro.

You can access vr_ad_reg::static_info::fields_info via vr_ad_reg::get_fields_info() (provided the static_info exists). This is a list with an item for each field that contains information about the field. Have a look in the data browser, this should help you.

Related

Create select input value with the ability to fill yourself in React

I need to make input field with the ability to add non-selected name. I've created extra field for this: so when user select "other" from a list the new field appears.
But the problem is that when I fill new field it changes status because both these field have same value={this.state.company}
My working code here:
https://codesandbox.io/s/select-form-sg5wr
I need to be able save value: if it's partner1 - save it, if it's other - then write other name and save it. But value should go like one value (value={this.state.company}). Maybe there is a way not adding new filed? Like if it's not in the list then write it.
Thanks in advance!
UPD: I've solved it just adding the third hidden input with
value={this.state.company === "other" ? this.state.companyOther : this.state.company}
and change setState.
I think it is pretty easy to handle using the state. You cannot do it in your own procedures when you are updating the same state again and again. You can declare a new state called companyOther and use the following condition in your handleSubmit,
this.state.company === "other" ? this.state.companyOther : this.state.company

Updating the min/max templateOptions

Please have a look at the following jsbin
At first, numberTest requires the user to input a number between 5 and 10 (as noted by the description beneath it). If you press the change min/max button, the min/max fields are updated to 500 and 510. Again, you can see the description has updated to these new values.
However, it still requires the user to enter a value between the original min/max settings (5 and 10). How do I get the validation to see the new settings? Clearly, I am setting them correctly because the description under the field is updating correctly. It seems that the validation is stuck with the original values.
EDIT: I added better validation messages to the field. You can see that even the validation message thinks that the new min/max values are correct but the field still requires 5-10.
The problem is that you're not using expressionProperties to change the values, but changing them manually. angular-formly does a lot of optimizations to make sure we're not adding watchers that are unnecessary. expressionProperties is how you inform angular-formly that these values can change.
Here you go: http://jsbin.com/xenuqo/edit?js,output
For more on expressionProperties see this

Update Drupal Application with an external DB script

I’m trying to update my Drupal application with an external script writing directly in the MySQL DB, I only need to modify one field of one specific datatype. I see it in a table named field_data_field_FIELDNAME but when I update this the application doesn’t change. I need to modify something else? Thanks
Assuming you are trying to change the field's value, try modifying both field_data_field_FIELDNAME and field_revision_field_FIELDNAME, then clear all cache.
Note that you do not actually need to clear all cache if you know what you need to clear, e.g. to clear the field's value for a particular node, you can use cache_clear_all('field:node:[your nid here]', 'cache_field');
If your are trying to change more than the field's value, I suggest you do it through the Field API.

How to make field read-only after changing the field value

I have an object which has a field picklist it contains values open and close , what I am trying to achieve : when a record is inserted with the picklist value close I am trying to make the field read-only when the field changed to close.
How can I achieve this ???????
You can add a validation rule like
AND(ISCHANGED(Field__c),ISPICKVAL(Field__c,"Close"))
That would throw an error if the field's value is "Close" and someone tries to change it.
Use two fields, where one is read-write and the other read-only. The same information can be written to both fields using either a trigger or field-update rule. Display the read-only when it's closed, else display the read-write field.
Of course, that's probably easier to do in Visualforce than not.

Accessing form elements filling fields?

I have a form which has an initial element, I am running a check using the confidence feature to check for other phrases that might match the user's input. If there are then i am going to a menu, from here i am asking the user to input a dtmf value to say whether one of these values where correct. If the user selects an option, i want it to fill that field of which it checked, with that interpretation or possibly go to another form which does the same thing, if i choose to do it using the other form, can u access filled fields from another form?
regards
According to the VoiceXML Specification the scope for that type of variable would only be accessible in the form. But you can assign the values to another variable before leaving the form that has document scope (i.e. defined just below the vxml tag). Or even give it global scope by defining the variable in the root document, which makes it accessible to the whole application.

Resources