0

Insert a link script inside the other script

How can I insert this script between line 16 and 22 😓 need the blue text as Link.

onclick="ui.openRecord('{ g }')"; style="color: #1E90FF; cursor: pointer; text-decoration: underline;">{ xTitle } <br></span>

let xTitle := "";
if Title = null then xTitle := "" else xTitle := Title end;
let g := first(select Albums where Title = xTitle);

let Vname := Name;
let VTitle := Title;
let VFormat := text(Format);
let css := "
:";
let content := "
<aside class = 'grid-container'>
<aside class = 'double' style='text-align:center; font-family:Helvetica; font-size:18px; color:dimgray; background-color:#FFF;'>&#x1F4C0  Info Artist / Album & Format </aside><br>
<aside class = 'double' style='text-align:left; color:green; font-size:16px; font-weight:bold;'>" +
    text(Vname) +
    " </aside><br>
<aside class = 'double' style='text-align:left; color:blue; font-size:14px; font-weight:bold;'>" +
    html("
             <span style=""color: grey""> Album </span>" +
    ":|" +
    "<br>") +
    VTitle +
    " </aside>
<aside class = 'double' style='text-align:left; color:grey; font-size:small; font-weight:bold;'>" +
    html("
             <span style=""color: black""> Format </span>" +
    ":|" +
    "<br>") +
    text(VFormat) +
    " </aside>
";
html(css + content)

9 Antworten

null
    • Rafael_Sanchis
    • vor 3 Monaten
    • Gemeldet - anzeigen
    let list := (
            let x := split(text(Search), ",");
            for item in x do
                let i := first(select 'PS4 Available Games' where 'Title:' = item);
                "
    <aside class = 'double' style='text-align:center; font-family:Helvetica; font-size:18px; color:dimgray; background-color:#FFF;'>&#x1F4C0  I n f o   /  Games Playstation  </aside><br>
    <span style=""color: black"">Game Name: </span>
    <span onclick=""ui.openRecord('" +
                raw(i) +
                "')""; style=""color: #1E90FF;font-size:18px; cursor: pointer; text-decoration: underline;"">" +
                i.'Title:' +
                "</span><br><br>
    <span style=""color: black"">Release Day: </span>
    <span ('" +
                raw(i) +
                "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                i.'Release Day' +
                "<br></span>
    
    <span style=""color: black"">Image: </span>
    <span ('" +
                raw(i) +
                "')""; <img src = Picture"">" +
                "<br></span>
                "
            end
        );
    html("" + list + "")
    <span style=""color: black"">Image: </span>
    <span ('" +
                raw(i) +
                "')""; <img src = Picture"">" +
                "<br></span>
                "
    

    These lines do not bring me the image zsome help.

    • T_Bartzsch
    • vor 3 Monaten
    • Gemeldet - anzeigen

    Hola, there are two problems: the ; is only used in the style tag to separate different styles:

    <span style="text-align: left; font-size: 18px; font-weight: bold;">

    your complete html code must be in " ... all ninox related script must be outside this html part, so you "leave" the html part with " and add the ninox part with + .... after the ninox part you add the ongoing html with + and " 

    html("THIS IS" + this is your ninox part + "YOUR HTML PART")

    so if in your example Picture is an Ninox image field then it has to look like

    <span ('" + raw(i) + "') <img src="" + Picture + ""><br></span>

    furthermore you should use shareFile(Picture) in those html codes

    <span ('" + raw(i) + "') <img src="" + shareFile(Picture) + ""><br></span>
    
      • Rafael_Sanchis
      • vor 3 Monaten
      • Gemeldet - anzeigen

       Hi I appreciate your response.

      <span ('" + raw(i) + "') <img src="" + Picture + ""><br></span>
      

      But don't work the image is not show. 

      Thanks

      • Michi.1
      • vor 3 Monaten
      • Gemeldet - anzeigen

       

      so vielleicht:

      .....img src='" + Picture + "'....
    • T_Bartzsch
    • vor 3 Monaten
    • Gemeldet - anzeigen

    So, you need to have an textfield with the ninox sharelink ... this link can be generated for all at once with a button.

    for i in select YOUR_DATA_TABLE do

    i.TEXTFIELD := shareFile(IMAGEFIELD)

    end

    Its not working in the formula as i mentioned above. This Textfield then can be used to show images in html

    html("<img src=" + TEXTFIELD_WITH_SHARELINK + ">")

    you can add single ' to the Source as Michi mentioned, but it works without the ' as well...

      • Rafael_Sanchis
      • vor 3 Monaten
      • Gemeldet - anzeigen

      T. Bartzsch 

      1._ I create a Textfield on the main Table. 

      2._ Then create a Button with the code, generate this.

      Is correct ?

      Then can I use this script 

      <span ('" + raw(i) + "') <img src="" + shareFile(Picture) + ""><br></span>

      Again thanks

      • T_Bartzsch
      • vor 3 Monaten
      • Gemeldet - anzeigen

       you create a textfield in the same Table where all your Games are listet and where your "Picture" field is. You can put this beneath your Picture and name it "ShareLink" or something like this.

      Then create a button somewhere with my Code. It is just for create the shareFile link for the Picture and put this link into your Textfield. This goes for every Entry in your Table. This is just used one time.

      When its finished, you can change the code to just  TEXTFIELD := shareFile(IMAGEFIELD) in the Button ... so when a new Dataentry is made with a new Picture, one can press the button and generate this share link for the new Picture just in this new entry.

      When all your Entrys have that ShareLink in the Textfield, then simply use this Textfield for showing the picture

      <span ('" + raw(i) + "') <img src="" + TEXTFIELD + ""><br></span>
      • Rafael_Sanchis
      • vor 3 Monaten
      • Gemeldet - anzeigen

      OK Thanksv👍

      • Rafael_Sanchis
      • vor 3 Monaten
      • Gemeldet - anzeigen

       Yes 👍

Content aside

  • Status Answered
  • vor 3 MonatenZuletzt aktiv
  • 9Antworten
  • 75Ansichten
  • 3 Folge bereits