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 1049259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:35:14+00:00 2026-05-16T16:35:14+00:00

I have an activity that has properties that look something like this (they’re set

  • 0

I have an activity that has properties that look something like this (they’re set up as proper dependency properties, I just kept it simple here):

public List<MyType> TypeList { get; set; }
public Int32 Index { get; set; }
public MyType SelectedType { get; set; }

and an execution that just does this:

SelectedType = TypeList[Index];

TypeList and Index are values that I set from other activities. I don’t set SelectedType to anything in the activity properties, I just let it get set in the execution.

Now I know for a fact that SelectedType is getting set properly, I can even point another activity to it and print out some values from it. So I’m quite positive that there’s nothing wrong with that activity.

However, I have an if activity with a condition that looks like this:

((MyActivity)GetActivityByName("activity1")).SelectedType != null

and it evaluates to false (meaning it evaluated SelectedType as null). I’m pretty sure that that activity cast is correct (I do things like that all the time), and if it weren’t wouldn’t I get a null reference exception when trying to access SelectedType? So I’m pretty sure I’m not doing anything wrong here, but for some reason SelectedType is coming up null in that condition and no where else.

It’s almost as if the condition is being evaluated before the activity is being run, but the activity comes well before the condition in the workflow, so I don’t see why that would be the case.

Can anyone shed some light 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-16T16:35:15+00:00Added an answer on May 16, 2026 at 4:35 pm

    Apparently it has to do with the while loop causing activities to be cloned. I fixed it by binding the activity property to workflow properties. For more info, see this post that I put up on the workflow forums.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an activity that has the following set as theme: android:theme=@android:style/Theme.Dialog However, there
I'm working on an Android application. I have an activity that has this method:
I have an Activity that has some form elements. This can be called from
I have an activity that has a TabHost containing a set of TabSpecs each
Here is the short version. I have a Bonus Activity that has 25 image
I have a application that has an activity that shows message logs. The thing
I have an Activity class which has an attribute that references an AsyncTask instance
Assume that we have 3 different activities. Each activity has its own XML file
I have an activity that I'd like to load from a preference screen. I'm
So I have my main activity that has some views and I have an

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.