Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 260
  • Last Modified:

How to display the user name in a field?

There is a Form in the database that can be set as closed and after that nobody is able to edit it.
There is two fields at the bottom a radio button (Open - Closed) and another field.
When a user set the Radio button to "Closed" the other Field should display his name.
How to do it?
0
didier20
Asked:
didier20
  • 2
  • 2
1 Solution
 
CRAKCommented:
Make it a computed text field:

@If(RadioFieldName="Closed"; @Name([CN]; @UserName); "")

RadioFieldName is the name of your radiobutton field. "Closed" is the value on which it should enter the name. If you use an alias, or capitals, change the formula accordingly.
If the radiobutton field has any other value, this formula will clear the field.

You could also set the property "Refresh fields on keyword change" to have the name filled out immedeately.
0
 
didier20Author Commented:
I'very simple but it doesn't show the name.

If the field type is Text and Computed then there is no way to select
"Refresh fields on keyword change"
Should I set this "Refresh" on the Radio button or the other field property?
0
 
CRAKCommented:
Yes, sorry if that wasn't clear. It's one of the radio button's properties.

It'll automatically force recomputation of the form (thus: the computed field containing the username) when you change the the radio button's value.
Otherwise you'd have to press F9 (refresh), save (forces a refresh) or trigger the refresh in another way before you would see the name appear.
0
 
didier20Author Commented:
OK, it works, now.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now