1. "Fabrik 4" helpers needed!

    You are invited to join other community members active in coding, maintaining and improving Fabrik. Please visit https://fabrik.help for more information!
    Dismiss Notice

List displaying Value instead of Label

Discussion in 'Community' started by aijosh, Dec 1, 2022.

  1. aijosh

    aijosh Member

    Level: Community
    Hello,

    I have a form (FORM A) which has a dropdown element that is generated using the Advance Eval populate PHP code. Value and Labels are taken from another table (LIST B) with it (id) set as the dropdown Value and (elementx) set as the dropdown Label.

    ISSUE: When LIST A is viewed. Some of the rows show (id) of List B while other show (elementx)

    How do I resolve this (id) is the value and not label. I need only the label (elementx) displayed throughout.

    See screenshot
    upload_2022-12-1_5-58-59.png
    Thank you
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    Usually it's displaying the value if there's no label given.
    I.e. in the database your row 3 has value 7 stored but your Advanced Eval populate doesn't contain a value 7/label something
     
  3. aijosh

    aijosh Member

    Level: Community
    Thanks for the response.

    I'm 100% sure the database has labels for every value.

    See screenshot of database table

    upload_2022-12-2_6-1-39.png
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    And your Advanced Eval populate is loading all of them?
     
  5. aijosh

    aijosh Member

    Level: Community
    Yes.

    Though I have it set to not show some time slots once more than 2 people have selected said meeting slot

    upload_2022-12-5_11-28-38.png

    As you see here, Sunday 9:00AM is not showing for this user because two people have already booked said time and I don't want it available for others to select any more.

    PS: Apologies for delayed responses. I do not get notified when you reply so I don't know to check
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    Yes, and this is exactly what happens in list view: there are no labels for all records with a time already selected twice.
    So modify your code to respect the view type or add a standard dbjoin element and show this in list view.
     

Share This Page