CAML query on SharePoint Drop down

1.4k Views Asked by At

New to CAML!

What needs to happen is that a user picks a drop down option of Sterling or Dollars, then puts an amount in the next list field which references a pre-existing list of exchange rates, the end result populates in a third field showing how much it converts to in the chosen currency.

We currently use Euros for the default currency.

Is JavaScript and CAML the road to take? Dunno where to start!

Help!

1

There are 1 best solutions below

0
Naveen Prasath On

In change event of Dropdown get the value, and query the next list which contains Exchange rates for the currency type using the selected currency, and obtain the value. so that you can populate the third field.

For ex: I have maintained the Exchange Rates in the List "Rates", and i selected Dollars from the dropdown. So in Dropdown on change event, fire a query against "Rates" list and get the Corresponding Exchange Rate. So now i can populate third Field.

The Caml Query will be like this:

           query.Query = string.Concat(
                          "<Where><Eq>",
                             "<FieldRef Name='Currency'/>",
                             "<Value Type='CHOICE'>Dollars</Value>",
                          "</Eq></Where>");

See the below links for Caml Query Builder tools: U2U Caml Builder

SPCamlHelper

Caml Query Tools