I'm setting up a calculated field and I need to display a value from another field based on another field's entry. Example:

If EventType equals "Down Time", set calculated field value to equal the value in the EventTime field.

If EventType equals "Slow Time", set calculated field to default formula.

How on earth do I do this?

有帮助吗?

解决方案

In InfoPath, you should be aware of you can't set the calculated field directly through the rule. and to achieve that as a workaround, you should do the following:

  • Add a new text field to your form > rename it as you need (field1).
  • In calculated field > specify its data source to be this field field1 by right click > select properties > specify the data source.
  • Now click on your EventType field > from the above ribbon > properties tab > add a rule on This Field Change > Set A field Value.

enter image description here

  • At set Field value, select the field that you have already inserted (field1).
  • At the Value > click on function column > select EventTime field as shown below.

enter image description here

  • Now the value of field1 should be the value of EventTime when the EventType is changed. Meanwhile, the calculated field data source is field1.so the calculated field = field1.
  • the last thing, to make field1 hidden, just remove it from form, but it will be there in fields list at Main data connection.
许可以下: CC-BY-SA归因
scroll top