Help

Re: Change price with single select ? =) Help =)

Solved
Jump to Solution
1009 0
cancel
Showing results for 
Search instead for 
Did you mean: 
MrSharks
4 - Data Explorer
4 - Data Explorer

Hello,

Thank you in advance for your help. I explain you my project 😃

I am in charge of a product sourcing agency.

I need to make a catalog of my products, but I need to be able to change the price of the product depending on the country of delivery.

Example:

Product 1 : USA : Price 10 Dollars
Product 1 : FR : Price 15 Dollars
Product 1 : CA : Price 20 Dollars.


If you can help me with this it would be great 😃

I don't know how to do it, with a select single maybe?

1 Solution

Accepted Solutions
Ben_Young1
11 - Venus
11 - Venus

Hey @MrSharks

There are quite a few ways to accomplish what you're looking to achieve, each with varying complexity.

For the sake of a simple demonstration, here's a quick look at a possible approach:

Ben_Young1_0-1672340271503.png

I created a simple table with similar pieces of data that you provided.
There is a product name, static price (in USD), and a single-select field with options to designate the country of delivery.

I created a formula field called Corrected Price with the following formula body:

IF(
    AND(
        {Country of Delivery},
        {Price (USD)}
    ),
    SWITCH(
        {Country of Delivery},
        "USA", {Price (USD)},
        "FR", {Price (USD)} * .96,
        "CA", {Price (USD)} * 1.4
    )
)

The formula will manipulate the value of the Price (USD) field based on what the single-select field value is.
I just had it do some random arithmetic to change the value; there's no real method to the madness.
If you like this approach, you'll need to change out the statements in the switch function in order to get your desired result.

Here's what the results look like with that formula:

Ben_Young1_1-1672341619944.png

One disadvantage to this approach is that it requires an upfront time investment from you to input all the potential values you want to account for in the switch function.
If you have a relatively small number of countries or values that need to be accounted for in the single-select field, then it's not much of a concern.
If you expect to be continually adding in new values, then that amount of technical debt may quickly become a disadvantage.

We could definitely get more granular and explore more possible routes for approaching your problem, but we'd definitely need more details in order to dig further.

 

 

See Solution in Thread

2 Replies 2
Ben_Young1
11 - Venus
11 - Venus

Hey @MrSharks

There are quite a few ways to accomplish what you're looking to achieve, each with varying complexity.

For the sake of a simple demonstration, here's a quick look at a possible approach:

Ben_Young1_0-1672340271503.png

I created a simple table with similar pieces of data that you provided.
There is a product name, static price (in USD), and a single-select field with options to designate the country of delivery.

I created a formula field called Corrected Price with the following formula body:

IF(
    AND(
        {Country of Delivery},
        {Price (USD)}
    ),
    SWITCH(
        {Country of Delivery},
        "USA", {Price (USD)},
        "FR", {Price (USD)} * .96,
        "CA", {Price (USD)} * 1.4
    )
)

The formula will manipulate the value of the Price (USD) field based on what the single-select field value is.
I just had it do some random arithmetic to change the value; there's no real method to the madness.
If you like this approach, you'll need to change out the statements in the switch function in order to get your desired result.

Here's what the results look like with that formula:

Ben_Young1_1-1672341619944.png

One disadvantage to this approach is that it requires an upfront time investment from you to input all the potential values you want to account for in the switch function.
If you have a relatively small number of countries or values that need to be accounted for in the single-select field, then it's not much of a concern.
If you expect to be continually adding in new values, then that amount of technical debt may quickly become a disadvantage.

We could definitely get more granular and explore more possible routes for approaching your problem, but we'd definitely need more details in order to dig further.

 

 

Thanks for youre help !!!!!! Can you help me for  For another question? or project? is it possible to write you live or on discord?