• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

How to make computed field editable?

I have a form and there are some fields on this form. There is a names computed field called adminperson. The formula for this field :
tmp:= @If(Department="Accounts"; "Ryan/abc_corp";Department="Application";"Brad/abc_corp";Department="Sales Admin";"Ryan/abc_corp";Department="Network Systems";"Ryan/abc_corp";Department="Admin";"Ben/abc_corp";Department="Special/Account Project";"Tom/abc_corp";"");

When the form is being created, User will enter an employee id and it will display the employee name, office, department in their respective fields and it will also display the admin person in charge name in the adminperson field of this employee id based on his/her department.

I like to make the field adminperson to be editable in case the person in charge in the adminperson field is not in, user can assign another person to be in charge of his request.

How do I make the field to be editable(Form will always load the person-in-charge name after user entered employee id)?
Please advise.
THank you.
  • 3
  • 2
1 Solution
created and editable field upto the computed.
And hide it; !@isMember(@userroles;"[Admin]")
and for computed, @isMember(@userroles;"[Admin]")

So, whenever Admin edits this doc, he will see editable field. Editable field name say, field1

for computed field add this formulae:
I assume, your formulae works:
tmp:= @If(Department="Accounts"; "Ryan/abc_corp";Department="Application";"Brad/abc_corp";Department="Sales Admin";"Ryan/abc_corp";Department="Network Systems";"Ryan/abc_corp";Department="Admin";"Ben/abc_corp";Department="Special/Account Project";"Tom/abc_corp";"");

Sjef BosmanGroupware ConsultantCommented:
Add a field that will contain the effective adminperson. If not filled in, the computed one should be used. You could even copy the computed one to the effective one when saving the document.
Sjef is right
Technology Partners: 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!

Sjef BosmanGroupware ConsultantCommented:
Kopibean, just a suggestion: don't put names in the design, but use some document(s) where you can store who's responsible for what department. Then, use a view and a @DbLookup to get the resp. admin.
kopibeanAuthor Commented:

how do I create this field to contain the effective person if not filled in, then the computed field will be used?

In my send button, formula is
@MailSend(adminperson ;"":"";"";"Travel Request";"";"Travel Request has been posted. ----->";[IncludeDoclink]);

@Prompt([Ok];"Message Sent";"Your Reservation Request has been sent to Admin Dept.")
Sjef BosmanGroupware ConsultantCommented:
I suppose you have a button that will take care of all? The idea is to always fill in the effective adminperson, or to have a third field (computed, hidden) that contains the adminperson to be used. I agree, yet another field, but it usually weighs up to a lot of formula coding all over the place.

Add a formula like
     @If(EffAdminPerson=""; @SetField("EffAdminPerson"; AdminPerson); "");
     FIELD EffAdminPerson=@If(EffAdminPerson=""; AdminPerson); EffAdminPerson);

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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