0

Problem with HTML

let ipc := (select WBS where text(IPC) like 1);
let css := "
<style>
single{
    font-size:medium;
    text-align:center;
    color:silver;
    font-family:Helvetica;
}
</style>
";
let content := "
<aside class = 'grid-container'>
<aside class = 'double' style='text-align:left; font-family:Helvetica; font-size:14px; color:dimgray; background-color:#FFF;'> Nivel 2 IPC </aside>
<aside class = 'double' style='text-align:center; color:#000080; font-size:large; font-weight:bold;'>" +
    ipc +
    " </aside>
</aside>
";
html(css + content)

 

 

WBS is a Table, the IPC is a Choice field with 3 data, Engineering, Procurement, Construction.

Need to Display in the box the Engineering but no display nothing.

Or there are order alternative

11 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 6 days ago
    • Reported - view

    If you use a select() function you get an array. To get a record, you have to use
    let ipc := first(select WBS where IPC = 1)

    I also removed the text() in this select because 1 is not present as text in the list, only as the number of the selected choice. If you want to use the text() function you have to compare with the wanted text. let ipc := first(select WBS where text(IPC) like "Engineering")

      • Rafael Sanchis
      • Rafael_Sanchis
      • 6 days ago
      • Reported - view

       

      Hi Steve I try this but don't work

      • Ninox partner
      • RoSoft_Steven.1
      • 6 days ago
      • Reported - view

      I was editing this post, you saw the old version....

      • Rafael Sanchis
      • Rafael_Sanchis
      • 6 days ago
      • Reported - view

       

      let ipc := first(select WBS where IPC = 1);
      let css := "
      <style>
      single{
          font-size:medium;
          text-align:center;
          color:silver;
          font-family:Helvetica;
      }
      </style>
      ";
      let content := "
      <aside class = 'grid-container'>
      <aside class = 'double' style='text-align:left; font-family:Helvetica; font-size:14px; color:dimgray; background-color:#FFF;'> Nivel 2 IPC </aside>
      <aside class = 'double' style='text-align:center; color:#000080; font-size:large; font-weight:bold;'>" +
          ipc +
          " </aside>
      </aside>
      ";
      html(css + content)

      Can't find the Solution.

      the problem use the name is that the Nivel 3 have 9 options in the choice field.

      • Ninox partner
      • RoSoft_Steven.1
      • 6 days ago
      • Reported - view

       

      Which field do you want to show from the WBS table? , now you get the recordnumber(36)

      change the first line to:

      let ipc := first(select WBS where IPC = 1).fieldYouWantToDisplay;
      • Rafael Sanchis
      • Rafael_Sanchis
      • 6 days ago
      • Reported - view

       

      I send my dummy DB, 

      Dashboard / EAT

      The idea is:

      ___________

      Nivel 2 IPC

      Engineering

      Budget

      ____________

      • Ninox partner
      • RoSoft_Steven.1
      • 6 days ago
      • Reported - view

       

      • Rafael Sanchis
      • Rafael_Sanchis
      • 6 days ago
      • Reported - view

       Thanks Steven👍

      • Rafael Sanchis
      • Rafael_Sanchis
      • 6 days ago
      • Reported - view

       

      Is not complete but is the idea 

      • Rafael Sanchis
      • Rafael_Sanchis
      • 5 days ago
      • Reported - view

       

      Hi Steven 

      first(select 'EAT Documents' where Disciplinas = 3).Disciplinas;

      There any way to view all items on Disciplinas .

      Disciplinas is a Choice file snd have 9 Disciplines

      Thanks

    • Rafael Sanchis
    • Rafael_Sanchis
    • 5 days ago
    • Reported - view