Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6176955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:11:26+00:00 2026-05-24T00:11:26+00:00

When I click a row in the datagrid, the PeopleDetails state is loaded. On

  • 0

When I click a row in the datagrid, the “PeopleDetails” state is loaded. On the details state, I have a checkbox. This checkbox was automatically generated when I created the form. This is because the field in the People table is Boolean.

I actually do not want to have a checkbox, but I want the value Yes/No printed next to the label.

So I write some AS code embedded in the MXML code:

<s:Form includeIn="PeopleDetails">
 <s:FormItem label="Is Present?">
  <fx:Script>
  <![CDATA[
  if(person!= null ){
   if(person.present==true){
    Alert.show("Test - Yes");
   }
  }
  else{
   Alert.show("No");
  }
  ]]>
  </fx:Script>
  <s:CheckBox id="personCheckBox2" enabled="false" selected="{person.present}"/>
 </s:FormItem>
</s:Form>

Just for testing purposes, I have Alert popups. Eventually, I would change to printing to screen the values Yes/No.

The problem:
-I do not know how to test whether the attribute present in the object person is true or false.
In the above, I get a FB complaint 1120: Access of Undefined property person.

If I remove the AS code, the checkbox works fine. The checkbox uses person.present to know whether it should be checked or not. Why cannot I use person.present to do the if-else test?

I would appreciate any help on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:11:26+00:00Added an answer on May 24, 2026 at 12:11 am

    If I’m reading you right, you want a Yes/No value rather than a checkbox, this should do it for you:

    Change :

    <s:CheckBox id="personCheckBox2" enabled="false" selected="{person.present}"/>
    

    To :

    <s:Label text="{(person.present)?'Yes':'No'}"/>
    

    So the new form looks like this :

        <s:Form includeIn="PeopleDetails">
            <s:FormItem label="Is Present?">
                <s:Label text="{(person.present)?'Yes':'No'}"/>
            </s:FormItem>
        </s:Form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid with one row intially. When I click on the first
This is what i'm trying to achieve: Home (Table View) > (Click on row)
$(.sectionHeader).click(function() { var row = $(this).parent(); while (row.next().length != 0) { row = row.next();
I have UITableView.when i click on it's 1 st row one another UITableView opens
I have code to create another row (div with inputs) on a button click.
I have a HyperLinkButton in every row of a datagrid in my silverlight app.
I have setup a DataGrid with a number of columns and a checkbox and
I have a data grid that looks like this <tk:DataGrid ItemsSource={Binding Parents} AutoGenerateColumns=False> <tk:DataGrid.Columns>
I have a DataGrid that has items in it. When you right-click on one
I have a DataGrid of seats available, each with a checkbox to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.