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

Default value help!

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
rognyn
Asked:
rognyn
  • 5
  • 4
1 Solution
 
p_parthaCommented:
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
 
HemanthaKumarCommented:
I would rather set the field value in abtnmR Input translation.

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

~Hemanth
0
 
rognynAuthor Commented:
Actuall both worked.........I chose the first.
You guys make this look sooooooeasy!
Thanks...
0
Independent Software Vendors: 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!

 
p_parthaCommented:
So can we get the points :-)

Partha
0
 
HemanthaKumarCommented:
I know both will work, but you know why I suggested that path... Guess ?
0
 
p_parthaCommented:
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
 
p_parthaCommented:
But i realized that input translation fires when the page is refreshed, so ur thing also shd work...

Partha
0
 
HemanthaKumarCommented:
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
 
p_parthaCommented:
Is it abandoned.....


Partha
0
 
HemanthaKumarCommented:
on vacation ?
0

Featured Post

Independent Software Vendors: 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!

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