Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

List control custom control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    List control custom control

    Hi All,

    I wish to display a custom control within a list control, but I can't seem to get my head round how to do it.

    Essentially the list control will have a list of say topics ... these are linked to a user using a many to many linking field

    For example ...



    Topic name
    Topic description
    ....

    Topic Link User
    TopicID_PK LinkIDPK UserIDPK
    TopicID_PK TopicIDFK UserID
    Topic text UserIDFK User password
    Topic description UserID email
    I then want users to be able to subscribe to the topics they are interested in and have their subscription status shown in the list category.

    So, we have a list control of topics with a little check mark or heart sign or something in the list of topics which reflects whether someone is subscribed to the category. I have no problem working with the SQL to determine if a topic is subscribed to ... I just need help with how to construct the list control custom control to display the item.

    I have watched http://www.youtube.com/watch?v=B1605a9mhp4 which is just a little too simplistic (or I am ). Can I run an xbasic function from the xbasic I insert into the custom control? How would I then display an image based on the result of the function?

    Any ideas gratefully accepted?

    Kind regards,

    Phil

    #2
    Re: List control custom control

    Phil,

    I almost see what you want to do... but I'm not quite sure. Could you type in a simple sample of data... how it would be displayed... how you want it to look. You'd have column(s) of data coming from a SQL source, plus a custom control will provide an additional column of data... again coming from a sql source... is that right? The custom control will use existing row data to get what it needs.

    Comment


      #3
      Re: List control custom control

      Hi David ...

      You have seen my app (a while back to be sure). There is a list of either categories or companies to which users can subscribe. I would like to be able to display a list of say all companies or all companies in a certain category or all categories and show that the user has either subscribed or not to said item.

      So ... we have a category database with just a category field and a primary autonumbered unique int field.
      We have a user database with a username field.
      We have a linking database with a primary autonumbered unique int field, and then the two linking fields as foreign keys ... CategoryIDFK int and UsernameFK int.

      If you remember the promotion page that you kindly helped with previously, I have buttons on it to save the promotion to a saved list and to (un)subscribe to company and category (which all works fine now).

      The user is logged in as Username. I would like them to see in the list of categories to which category they are subscribed.

      Attached is an image of what I would like to achieve. In the bottom right of each promotion, I have added a little heart symbol to some to simulate them being subscribed to.

      Thanks for looking at this for me David.

      Regards,

      Phil


      promotionslist.jpg

      Comment


        #4
        Re: List control custom control

        Hey Phil,

        Have a look at this video... I think it's what you're after.

        I think what isn't realized about the Custom Control is that it is an XBasic function that you can do anything with. As an end result... what you're returning per row... is HTML. But, before you return that HTML, you can write any XBasic to help you get the data to build that HTML.

        Hope this helps.

        http://youtu.be/Yu7KA-oAnR8

        Comment


          #5
          Re: List control custom control

          David,

          That is exactly what I am looking for. Thank you so much. I am amazed at the efforts you go to to help people here, people from far off countries that you have never met. I try to help out where I can, but I am still learning Alpha and its ways of doing things, coming from over 20 years of Clarion, so the assistance I can give is limited.

          I had watched Selwyn's video, but was having difficulties going from the rendering of a bit of text taken from the data already within the control to the concept you have shown so succinctly. I think this could also be done using the custom data source as well, which seems to be able to drag in data from wherever you want, but because I had already got all the rest of the lists done and working, I felt the custom control option was a better one.

          It is certainly a testament to the power of Alpha that things can be done so easily ... when you know how!

          Once again, thank you so much David. Should we ever meet, I owe you many beers!

          Regards,

          Phil

          Comment


            #6
            Re: List control custom control

            My pleasure. I was in Access/SQL since Access first appeared but with no Web/Mobile presence and the Access runtime messing with other Access installs I'd had enough.

            With Alpha you have, many times, a choice of getting to where you need to go. Sometimes the decision is just how much more fun one way is over another. The Custom Data option is really excellent but I think the Javascript option outshines it. Imagine... with so many web services supporting JSON you can make calls to those services and populate your list. Actually you can do exactly the same in XBasic and use the functions there to convert JSON to CR-LF to feed the list. Again... multiple options.

            Comment

            Working...
            X