Jump to content

Blank/Null Value for a related value list in a pop-up menu


Recommended Posts

Posted

(I can't seem to find a definitive answer here after poking around, so I apologize if this has been covered before.)

 

I have a related value list that I'd like to use in a pop-up menu. The problem is, I always have to include an adjacent "clear" button to clear the field and it looks amateurish to say the least...so I'd like to have a null/blank value at the top of the value list so users can "clear" the field of an unwanted value.

I thought I'd be clever and try this:

Let (  

[    

_relatedValues = List ( fieldname );    

_blank = ""   ];  

_blank & ¶ & _relatedValues

)

 

...but that won't work because it being a calculation using related values, it can't be indexed. Is there an elegant way to make this happen?

 

Cheers,

Rich

Posted (edited)
1 hour ago, 21st Century Man said:

won't work because it being a calculation using related values, it can't be indexed.

It wouldn't have worked even with an indexed field, because a value list based on a field will never include a blank value.

 

1 hour ago, 21st Century Man said:

Is there an elegant way to make this happen?

You could define a calculation field in the related table that combines the "real" value with a placeholder, for example:

List ( Valuefield ; "   " )

Then define the value list to use values from this calculation field and (if necessary) make the target field auto-enter a calculated value substituting 3 consecutive spaces with nothing.

 

Edited by comment
  • Plus1 1
Posted

Thanks! I just have to remember to disable the "Do not store calculated results--recalculate when needed" checkbox in the calculated field for it the value list to work. *blush*

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.