Alpha Video Training
Page 1 of 2 12 LastLast
Results 1 to 30 of 39

Thread: List Controls Not Working After Updating Alpha Software Version

  1. #1
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default List Controls Not Working After Updating Alpha Software Version

    I have been without software updates for a while with Alpha. I just got back on the subscription and updated to one of the latest versions. Now, a lot of the List Controls that were working are not. In my List Controls I am filtering on a argument value that gets set when a user logs in. When I take that argument out of the SQL in the List Control and hard code the argument value, the List Control works fine. It seems after updating the software something has happen where the List Control is not showing the List based on the argument value that is set. I also have a textbox that gets set that same argument value when the user logs in, it is getting the correct argument value, so I know the argument value is getting set correctly. Any ideas here?

  2. #2
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,746

    Default Re: List Controls Not Working After Updating Alpha Software Version

    The latest official update broke paginated list controls. Alpha has fixed it, but, only with a prerelease unworthy for production. There we also bugs with IE/edge browsers that were fixed...but in a prerelease.

    What version did you upgrade to?
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  3. #3
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    I upgraded to the November 8th version but that was causing my List Controls to throw an error, so I went back to 12.4.5.4.5 Build 5221 and am seeing what I just described above.

  4. #4
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,746

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Have you tried recalculating your UX? Is there an error in the browser's console when the list loads?
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  5. #5
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    What do you mean by recalculating? I don’t see any error.

  6. #6
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,746

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Open the component in your developer. Click on the "Menu" button (beside the Mobile checkbox). Select recalculate all controls. Then give it another shot.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  7. #7
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Did that recalculation but still nothing.

  8. #8
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: List Controls Not Working After Updating Alpha Software Version

    What I have found to be the problem with arguments in a circumstance like yours is that there is a javascript syntax error somewhere.
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    You've not mentioned which version you came from when moving to 5447. Now you've moved to 5221.
    You've not mentioned what database you're using.
    Is this a web app or a PGB app?
    Is the argument set up as a session variable, a UX control... or something else.
    You've not reported seeing, or not seeing, Javascript errors in the console.

    You'll need to post a UX that is giving you problems along with a sample table. Don't worry about security tables... as local tables can be used.

    I see no issues, generally, with Lists under 5221 or 5447, other than a Multi-Tenant setup based on a character TenantId... but you're not using that feature.

    If you've upgraded from a version that was years old I wouldn't be surprised something didn't work.

    More information is required.

  10. #10
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Yes I moved from 12.4.4.5 Build 4491 to 5221, so Build 4491 was back from mid 2016. I wondered before I upgraded should I pick a few earlier versions to upgrade first and making sure everything worked before moving to the latest version. It is a PGB app. It is passing a state variable to an embedded UX, the child UX uses that state variable value to set an argument which the List Controls that are broke uses to filter on. Does this give more useful information? I would have to trim down the UX and database to be able to post it here. Let me know if this is necessary. I basically have a system down issue right now so I am in a hurry to get this fixed!

  11. #11
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    I don't think you can use a State Variable as an argument for a List Control. There must be another step going on.

  12. #12
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    The state variable gets set in the login UX and then the value of that variable sets a text box control with its value. Then a argument is set at runtime with the value in text box control. I think I am describing it more accurately now.

  13. #13
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    You also report that you're passing a state variable to an embedded UX. How are you passing that state variable?

  14. #14
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    It just sets the text box control to the value of the state variable. The text box is in the child UX and the state variable is getting set in parent (login component), hence it passes per se. I don’t think the state variable is the problem because it is getting set to the correct value. I think it is something with the argument getting set and the list control using that argument to filter

  15. #15
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: List Controls Not Working After Updating Alpha Software Version

    It sounds like when you load the embedded object you are "leaving" the textbox with the value behind in a sense. This might be a good use case for a session variable, even though it is a PGB. Try setting the filter of the list to a session var - and set the session var in the parent object. That should work.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  16. #16
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    No the text box is in the embedded UX (child UX)

  17. #17
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Another thing I noticed, in the List Control when I am in the SQL Genie and do an Execute Query it prompts me for that argument value and when I put in that value it runs correctly. However, when I am in the main screen of the same List Control and click Preview, it doesnt ask me for that argument value and just shows a blank screen.

  18. #18
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: List Controls Not Working After Updating Alpha Software Version

    I am not sure I understand exactly - if you're trying to set the value of a textbox in the child component from the parent so you can filter the list control - why not just do as I am suggesting in the first place and skip the textbox? The list in the child can be easily filtered from the variable then.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  19. #19
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    It just sets the text box control to the value of the state variable. The text box is in the child UX and the state variable is getting set in parent (login component), hence it passes per se. I don’t think the state variable is the problem because it is getting set to the correct value. I think it is something with the argument getting set and the list control using that argument to filter
    What login value is being set to the State variable?

    How and where (event) is the child textbox being set with the parent state variable?

    It just sets the text box control to the value of the state variable.
    This doesn't say anything. What is "it"? Be specific.

  20. #20
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,044

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Steven, in the main dev screen, when you click preview it shouldn't ask you since it's supposed to be as if it were running...in the builder, it's asking so you can supply it as the developer.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com "I am not discouraged, because every wrong attempt discarded is another step forward."

  21. #21
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Ok in my Parent UX Component (Login UX) in the onLoadComplete Javascript for the Embedded UX (Main app) I have this code that is setting the textbox value in the Embedded UX. The state variable has already been set when the user logins through code in the onLogin event. Below is the code:

    var pObj = {dialog.Object}.getParentObject('HoldLoginValue');
    var HoldLoginValue = pObj.stateInfo['HoldLoginValue'];
    {dialog.Object}.setValue('HoldLoginValue',HoldLoginValue);

    Ok, this code is working fine because the textbox in the Embedded UX holds the correct value when the user logins in. In one of the List Controls that is having trouble in the Arguments section I have an argument called argHoldLoginValue that sets at runtime to {HoldLoginValue} which is the value in the textbox. Then in the SQL statement in the List Control one of the items it is filtering on is argHoldLoginValue. Does this make sense now? If not I guess I will have to trim down the UX Component and Database and post it. I think the problem is argHoldLoginValue is not getting set correctly before the List Control runs or something. Like I said, all this was working before I upgraded the software and I didn’t do anything but upgrade the software so it is frustrating that all of sudden it is broke now.

  22. #22
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Ok... thanks... now there's some good information to go on.

    Here's the funny thing. This post is almost an identical post to one you created exactly 1 year ago...
    https://forum.alphasoftware.com/show...HoldLoginValue

    The code you've post in this year's thread could not have worked in 4491. The Child UX onLoadComplete only ever runs once. This may be an issue depending on what you need to do. However, aside from that, pObj will always returns false because the Parent Object is not available inside onLoadComplete.

    So... what else is going on to set the Child Textbox control to the State Var value?

    Follow last year's solution.

    However, you don't really need to use a State Var. You can pass the Child UX Argument a value via the Embedded Component property... Argument Bindings. This does mean you need to set a Textbox control on the Parent to the value needed... but you can use e.control.

    If you want to use a State Var... then you can still use the Argument Bindings with the Javascript function option.

  23. #23
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    It was working with 4491 with filtering my List Controls how I have it set up now, one thing I remember I had to check the Delay render to visible for the List to show. I probably could go back to Build 4491 and it will probably will work without changing anything so not sure why it is broken now? I looked at my Login UX (Parent UX) more and I do have a HoldLoginValue textbox and then in the Embedded Component property Argument Bindings the HoldLoginValue is binded to argHoldLoginValue. I read through the thread a year ago and the answer how to fix this is not clear to me. So not sure what the remedy is here. Like I said my List Controls were working, I was/am having an issue getting a video to play without crashing my app from this List Control but I assume that has nothing to do with this?

  24. #24
    Member
    Real Name
    Rich Fulham
    Join Date
    May 2011
    Location
    Portland, OR
    Posts
    995

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Steven,
    1) I have not read all your posts here and I probably won't directly address the problem you are describing. But I am wondering, when you say "state" variable are you perhaps referring to "Session" variable? They are different things.

    Both have their caveats. If you indeed are working with "state variables" on the client side then you must be careful and validate their existence before referencing them in client-side code. I do not believe Alpha has addressed the reported issue that state variables do not get a high enough priority of being initialized soon enough in some client-side events. Sometimes alpha will run through your JavaScript code without having initialize the "state" variables. Luckily, in the case I found, Alpha calls your code one more time later on in the initialization process and things work out okay, as long as you have coded your javascript not to crash when the expected "state" variable does not exist.

    2) If you are using session variables then make sure their data type is always initialized to a string. You can no longer use other data types with session variables. To initialize session variables in xbasic, some people recommend doing something like this to init them as strings.
    session.myvar = "" + what_ever.

    I prefer seeing it spelled out:
    session.myvar = convert_type( what_ever, "C")

    Also make sure you never DIM a session variable. Wrong way:
    DIM session.myvar AS C

    There were versions of alpha where that type of DIM would create another local variable called 'session' that was different than the global 'session' variable that should already be there.

    Just initialize session variables without "DIM"ming them.

    session.my_var = convert_type(some_expression, "C")

  25. #25
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    So one answer might be to make sure the HoldLoginValue variable is a session variable, the HoldLoginValue variable is an INT now so I would have to convert it to a string? I have another session variable that is holding the user's email address and that seems to be working fine. I thought I heard that everything was moving away from session variables to state variables especially in the mobile app development side?

  26. #26
    Member
    Real Name
    Rich Fulham
    Join Date
    May 2011
    Location
    Portland, OR
    Posts
    995

    Default Re: List Controls Not Working After Updating Alpha Software Version

    The "Session.what_ever" fields must always be initialized as strings now. I am not promoting their use, just saying they have to be set to string and converted back to native types when needed as such.

    I do not know if State variables work very smoothly for passing data from one component to the next. I have only used them in situations where I have ensured grid/ux caching is off when calling a component and I let that component check if state variables have already been setup for that component or not. If it detects state variables then it uses them by copy what it needs into the e.rtc variable. If the state variables have not been setup, it creates them such that alpha will preserve them with that component and then I copy those values to the e.rtc variables to use during the current server call.

    UX's are nice in that they have good support for "Arguments" - I use them extensively, and not just for piping into the SQL query.

    Grid's are lacking in good support for Arguments, I've exhausted myself arguing for more support for Arguments in Grids.

  27. #27
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Thanks, but still looking for the answer what is happening with my List Controls not filtering based on an argument value. Is there a good way to debug List Controls to see what is happening as the code is ran? I know Alpha is low code for the developer but it seems to me the developer still needs access to line by line debugging in situations just like this!

  28. #28
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Quote Originally Posted by swest View Post
    It was working with 4491 with filtering my List Controls how I have it set up now, one thing I remember I had to check the Delay render to visible for the List to show. I probably could go back to Build 4491 and it will probably will work without changing anything so not sure why it is broken now? I looked at my Login UX (Parent UX) more and I do have a HoldLoginValue textbox and then in the Embedded Component property Argument Bindings the HoldLoginValue is binded to argHoldLoginValue. I read through the thread a year ago and the answer how to fix this is not clear to me. So not sure what the remedy is here. Like I said my List Controls were working, I was/am having an issue getting a video to play without crashing my app from this List Control but I assume that has nothing to do with this?
    You need to provide a sample UX at this point.

  29. #29
    Member
    Real Name
    Steven
    Join Date
    Oct 2011
    Posts
    632

    Default Re: List Controls Not Working After Updating Alpha Software Version

    So what is best to post regarding the UX, just a trimmed down version of Child UX (main mobile app) or include the Login UX (parent) too?

  30. #30
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,535

    Default Re: List Controls Not Working After Updating Alpha Software Version

    Parent UX with Login... all set up the way you want with arguments or onLoadComplete... and a Child UX with a filtered List.... and a sample SQL table dump with just a few records.

    If you don't have it set up exactly the way it's failing for you... with all the pieces... then there's no point.

Similar Threads

  1. List Controls And Upgraded Alpha Software Problem
    By swest in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 06-16-2018, 01:19 PM
  2. Seeking Alpha 4 version 8 software
    By Jewel62 in forum Alpha Four Versions 7 and 8
    Replies: 5
    Last Post: 11-08-2016, 12:15 PM
  3. Where Can I get Alpha Four Version 8 software upgrade
    By michaelgeller in forum Alpha Four Versions 7 and 8
    Replies: 2
    Last Post: 10-31-2016, 10:24 PM
  4. Version Control and Alpha Software
    By dionmccormick in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 11-12-2013, 09:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •