• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How can I submit data to BC based on condition ?

New Here ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

I've a WebApp where I am using a radio button list named BedRooms with values 2+, 3+, 4+. First of all I want to know have I taken the correct decision of taking radio button list for field bedrooms,  basically my web app will be used to search database for homes with no of bedrooms based on the condition given.

If suppose a a home has just 1 bedroom then it will fetch correct results but if I want the search to fetch results for bedrooms more than 1 then how can I achieve this using radio button list. Do I need to change my data type ? Kindly provide me some help I am really new to BC.

TOPICS
Newbie Corner

Views

644

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Hey, you need to use number field in this case. It allows you to input an integer which then can be used in the search form to search for things like less than 2 bedrooms.

Here some instructions on the advanced search customization:

You can change the format of any date or numeric field. By default these fields appear as a range in the search form, e.g.:

This the Default search layout for date and numeric fields:

default-search.png

In this example the Price field has been changed from a range to a drop down.

customised-search.png

By default number and date fields will appear as:

Price between:

<input class="cat_textbox" maxLength=255 name=CAT_Custom_11125_Min> And

<input class="cat_textbox" maxLength=255 name=CAT_Custom_11125_Max>

You can change this to:

Price between

<select class="cat_textbox" maxLength=255 name=CAT_Custom_11125>

<option value=”0,10000”>Up to $10,000</option>

<option value=”10001,20000”>$10,001-$20,000</option>

<option value=”20001,30000”>$20,001-$30,000</option>

<option value=”30001,40000”>$30,001-$40,000</option>

</select>

You can similarly apply the above technique to date fields:

Manufacture Date

<select class="cat_textbox" maxLength=255 name=CAT_Custom_11126>

<option value=”1-Jan-1900,31-Dec-1989”>Older than 1990</option>

<option value=”1-Jan-1990,31-Dec-1999”>1990-1999</option>

<option value=”1-Jan-2000,31-Jan-2010”>Newer than 2000</option>

</select>

With date fields you can also use this approach:

Manufacture Date

<select class="cat_textbox" maxLength=255 name=CAT_Custom_11126>

<option value=”today”>Today</option>

<option value=”yesterday”>Yesterday</option>

<option value=”lastweek”>Last Week</option>

<option value=”lastmonth”>Last Month</option>

</select>

Note: Ensure you use the correct name for each field. With date and numeric fields the two fields associated for each field end with _Min and _Max. If you are using the above approach then this ending is removed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

Price between

<select class="cat_textbox" maxLength=255 name=CAT_Custom_11125>

<option value=”0,10000”>Up to $10,000</option>

<option value=”10001,20000”>$10,001-$20,000</option>

<option value=”20001,30000”>$20,001-$30,000</option>

<option value=”30001,40000”>$30,001-$40,000</option>

</select>

You can similarly apply the above technique to date fields:

Thanks for your reply, I liked the approach but I want to ask what if need an option field with value greater than 40000 as suggested above, Then how will you interpret that thing here ?

Can this thing be done with radio button ?

Message was edited by: JD380

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 13, 2012 Sep 13, 2012

Copy link to clipboard

Copied

LATEST

I guess greater than 40,000 would look like this:

<option value=”40001,100000000”>Greater than 40000</option>

That's the best you can do, and it should work unless you have items which are > 100 mil.

Can't be done with radio button.

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines