Clearing Values from a Lookup field
Archived from the Xataface Users forum.
iegroup21 — Sat Nov 19, 2011 9:05 pm
Hi guys,
I am trying to use the lookup widget for a field, and it works fine, but I have not been able to clear the value in the field once its been selected, I can only replace it with another.
So, I am wondering If there is a way to clear value from a field using the lookup widget and also how to use the valuelist to show more then 1 field of the target table in the list and view action.
The current value in the valuelist is
[Members]
__sql__ = “SELECT MemberID, MemberGivenName FROM Member”
With this view and list action only show the given name, I have tried
[Members]
__sql__ = “SELECT MemberID, MemberGivenName, MemberFamilyName FROM Member”
and it still shows only the given name, I know that in the __sql__ can only pull 2 fields by looking in the valuelist help but I was hoping that there is a way to get 1 more.
ctripp — Sun Nov 20, 2011 12:49 am
In answer to your second question about multiple fields, I use the CONCAT function in the sql query to display the fields as one.
You can Concatenate multiple fields not just two.
- Code: Select all
[Members] __sql__ = "select MemberID,CONCAT(MemberID,' ',MemberGivenName,' ',MemberFamilyName) from Member order by MemberID"
-Clayton
shannah — Tue Nov 22, 2011 11:07 am
Yes. The lookup widget right now doesn’t support clearing values…. this really needs to be done and is high on my list… but haven’t been able to get to it yet.