Solved

Default value help!

Posted on 2003-11-03
10
225 Views
Last Modified: 2013-12-18
I have 2 fields on my form abtnm & abtnmR, for both the default value is "".  Field abtnm's value (text) is chosen, by the user,  via a dialog list that uses a @DbColumn fucntion for choices.  Field abtnmR's value can also be chosen via a dialog list that uses a @DBlookup function based on the value of abtnm for choices, OR it can be left blank.  

I want the value of abtnmR to default to the value of abtnm if the field is left blank.

How can I do this?
0
Comment
Question by:rognyn
  • 5
  • 4
10 Comments
 
LVL 14

Accepted Solution

by:
p_partha earned 250 total points
ID: 9672900
Ok in the abtnm field's input translation just put this:
field abtnmR:=@if (abtnmR ="";abtnm;abtnmR);abtnm

Let me know whether this is what u wanted...

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9672977
I would rather set the field value in abtnmR Input translation.

@if( @Trim(abtnmR) = ""; abtnm; abtnmR)

~Hemanth
0
 

Author Comment

by:rognyn
ID: 9673476
Actuall both worked.........I chose the first.
You guys make this look sooooooeasy!
Thanks...
0
 
LVL 14

Expert Comment

by:p_partha
ID: 9673577
So can we get the points :-)

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9673802
I know both will work, but you know why I suggested that path... Guess ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Expert Comment

by:p_partha
ID: 9673933
Hemanth,

i am not sure why u said that, but what i thougth was if the user clicks the cursor into any other field apart from abtnmR, after choosing the abtnm field then ur logic may not work... Just a thought.. but would love to hear ur side comments

Partha
0
 
LVL 14

Expert Comment

by:p_partha
ID: 9673987
But i realized that input translation fires when the page is refreshed, so ur thing also shd work...

Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9674030
Simple, whenever the problem occurs in that field like field blanks out (like you would have seen lot in this forum) and first guess is to check the current fields translation or validation...Right ! So it is most of a design standard rather than personal choice.
0
 
LVL 14

Expert Comment

by:p_partha
ID: 9681946
Is it abandoned.....


Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9682228
on vacation ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now