Read selected value of Enum field

Hi

I'm trying to populate [Shipping Address] text field with the selected value from [Last Ship Address] enum field.

[Last Ship Address] column contains a list of addresses.

I'm using this expression in [Shipping Address] app formula, and its returning 'false' result.

[_THIS] = [Last Shipped Address]

I'm aware the different column types...text vs enum is probably causing the issue. I tried wrapping [Last Shipped Address] with ANY(), TEXT() without success. 

How can I read the selected value of the [Last Ship Address] enum field?

Thanks,

 

 

Solved Solved
0 3 210
1 ACCEPTED SOLUTION

Hi

I was thinking through your first statement.

Assignment is not done as in most programming tools where you specify the "column to be assigned" = "value to assign".  Its not needed because you are already in the context of the column to be assigned.  

Manage to get to work....

IF ( ISBLANK( [Last Ship Address] ),
    ( [Street] & ", " & [Ward] & ", " & [District] & ", " & [Province]),
    [Last Ship Address] 
)

Thanks for your input. 

Cheers!

View solution in original post

3 REPLIES 3

Assignment is not done as in most programming tools where you specify the "column to be assigned" = "value to assign".  Its not needed because you are already in the context of the column to be assigned.  

You haven't specified your use case but it seems you want to automatically assign the [Shipping Address] value on a new row to be the value from [Last Ship Address].  To do this, you would go into the column properties and set the "Initial Value" settings to simply [Last Ship Address].

This will automatically set the value when a new Form is opened and then a user can change it if needed.

If your use case is something more, please specify more details.

Hi

Thanks for coming to the rescue!

My use case is I'm giving users 2 ways to enter a shipping address.

Option A:  enter [Province], [District], [Ward], [Street] manually

Option B:  select an address from [Last Ship Address], which has an expression that populates this enum field with last used addresses from the same shipper.

[Shipping Address] is a read only text field, I'm using this expression in app formula

IF ( ISBLANK( [Last Ship Address] ),
    ( [Street] & ", " & [Ward] & ", " & [District] & ", " & [Province]),
    ( [_THIS] = [Last Ship Address] )
)

Your suggestion to use [Last Ship Address] in Initial Value isn't not going to work for me. 

Is there a way to read the selected value from [Last Ship Address] Enum field?

Hi

I was thinking through your first statement.

Assignment is not done as in most programming tools where you specify the "column to be assigned" = "value to assign".  Its not needed because you are already in the context of the column to be assigned.  

Manage to get to work....

IF ( ISBLANK( [Last Ship Address] ),
    ( [Street] & ", " & [Ward] & ", " & [District] & ", " & [Province]),
    [Last Ship Address] 
)

Thanks for your input. 

Cheers!

Top Labels in this Space