on 07-11-2011 6:25 PM
Hi Experts,
I have this requirement where I need to copy the first 4 values in to a field.
Ex:
Description (Field Name)
Look up values are..
4233 - warehouse
6452 - store
8792 - Bulk warehouse
Now whenever the user selects a lookup value from this field, the first 4 values should be copied to a field called 'Site Code'.
I have written an assignment on site code field .. LEFT(Description.[Record], 4)
But the values are not copied !!!! means assignment did not work.
is this possible to copy on selected lookup values for any record?If so am i following the right validation or missing something!!!!
Issue 2:
This is one more thought of issue 1..
i need to compare this 4 digit value with a field called 'Code'.
So IF Code = First 4 values of Description then True Else False..
Will it be possible to write This validation, I tried but did not work..
Can anyone help me please..
Kind Regards
Eva
Hey Eva,
For Issue 1:
Using assignments is easier if "Site Code" is Lookup Table with similar Display Field in which you are copying values.
I guess in the current scenario the numeric part is the Display field.Please check and confirm.
For Issue 2:
I think this is very much possible,you can hardcode TRUE/FALSE based on IF(....,then,else)
Try
IF(LEFT(Description.record,4) = Code.record,TRUE,FALSE)
Let me know your findings.
Thanks,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
Thanks for the responses.
I have tried IF(LEFT(Description.record,4) = Code,TRUE,FALSE)
And this validation did not work.
Description is a lookup field So selected Description.Record
Code is a text field with length as 4, So selected as Code
Also tried IF(LEFT(TRIM_LEFT(Description.[Record]),4) = Code , FALSE)
Even this did not work..
Could anyone help me please..
Kind Regards
Eva
Hi Guys,
Thanks for the Responses..
I have tried all the below validations, where none Worked..
MID(Table1.Description,1,4)
IF(LEFT(Description.record,4) = Code,TRUE,FALSE)
IF(LEFT(TRIM_LEFT(Description.Record),4) = Code , FALSE)
Did anyone try anything different other than these which actually worked ??
Kind Regards
Eva
Hello Eva
Are you have field type text?
if your answer = Yes
You need use TRIM_ALL or TRIM_LEFT function because you text strin may contain spaces before your number
Your expresiion shall be
LEFT(TRIM_LEFT(DEscription),4)
If your answer = No
i 'm not sure that you can easy transform your value to text because in expression builder function for value to text transformation is absent
for values you need use somthing like
if(code-9999 >=0, [your code more or equal than 9999], if(code - 999>=0, [your code more or equal than 999 but less than 9999]))
Sure you can store your result to numeric field - if you want to store result to text field you shall to set text value in your expression results part
etc.
Regards
Kanstantsin Chernichenka
Edited by: Kanstantsin Chernichenka on Jul 11, 2011 9:28 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.