Skip to Content

Copy Look Upvalue first 4 values

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2011 at 06:28 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 11, 2011 at 06:30 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.