0

shareLink Problem

1. I create a text field (ShareField)

2. I create a button with this code.

for i in select Albums do
    i.(ShareLink := shareFile(Cover))
end

 

Copy

 

3. I try to show the Cover here.

<span style=""color: black"">Cover:</span>
<span ('" +
            raw(i) +
            "') <img src = width='100' height='50'"" + ShareFile + ""><br></span>

 

Copy

 

But don't show the image, show image up. something bad in the code.

16 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 5 mths ago
    • Reported - view

    try:

    <span style=""color: black"">Cover: <br></span>
    <img src = "" + i.ShareLink + "" width='100' height='50'><br>

    The source of the <img>-tag should be the link and not the dimentions. Also i guess you need the i.ShareLink field, not the ShareFile....

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

        Hi Steven.

       

      The script better But can show the image

      • Ninox partner
      • RoSoft_Steven.1
      • 5 mths ago
      • Reported - view

       can you post the whole script of your formula field? (Not sure why you need the raw(i) in your previous code)

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

       

      let list := (
              let x := split(text(Choice), ",");
              for item in x do
                  let i := first(select Albums 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   /  A l b u m s  </aside><br>
      <span style=""color: black"">Artist Name: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style=""color: #1E90FF;font-size:18px; cursor: pointer; text-decoration: underline;"">" +
                  i.Name +
                  "</span><br><br>
      <span style=""color: black"">Title: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.Title +
                  "<br></span>
      <span style=""color: black"">Release Day: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.'Release Date' +
                  "<br></span>
      <span style=""color: black"">Format: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.text(Format) +
                  "<br></span>
      <span style=""color: black"">Type: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.text(Type) +
                  "<br></span>
      <span style=""color: black"">Tracks: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.Tracks +
                  "<br></span>
      <span style=""color: black"">RYM Raiting: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;';; cursor: pointer; text-decoration: underline;"">" +
                  i.text('RYM Raiting') +
                  "<br></span>
      <span style=""color: black"">Bardcode: </span>
      <span onclick=""ui.openRecord('" +
                  raw(i) +
                  "')""; style='text-align:left; color:green; font-size:16px; font-weight:bold;'; cursor: pointer; text-decoration: underline;"">" +
                  i.text(BarCode) +
                  "<br></span>
      <span style=""color: black"">Cover: <br></span>
      <img src = "" + i.ShareLink + "" width='70' height='100'><br>
                  "
              end
          );
      html("" + list + "")
      
    • Ninox partner
    • RoSoft_Steven.1
    • 5 mths ago
    • Reported - view

    Strange...

    I guess your ShareLink field in in the Albums table? Did you already tried to follow the link in your ShareLink field? Do you see an image?

    (I don't get an image if I try the link showed in your screenshot in your first post though)

    I think your button to create the links should be:

    for i in select Albums do
          i.(ShareLink := shareFile(i.Cover))
    end

    Hope this helps...

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

      RoSoft_Steven Yes the ShareLink is in the Albums table and the button. yes view the image, the first one

      The the problem 

    • Ninox partner
    • RoSoft_Steven.1
    • 5 mths ago
    • Reported - view

    Maybe it's because the scr needs to be in quotation marks. Try:

    <img src = '"" + i.ShareLink + ""' width='70' height='100'><br>
      • Rafael Sanchis
      • Rafael_Sanchis
      • 5 mths ago
      • Reported - view

       Worse lost the link

      Crazy 😖 Steven Thanks.

      • Ninox partner
      • RoSoft_Steven.1
      • 5 mths ago
      • Reported - view

      can you invite me to your team or upload a sample database so I can have a look? steven at rosoft.be

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

      RoSoft_Steven

      Yes no problem Steve but tomorrow if you can ? Or Monday.👍

      • Ninox partner
      • RoSoft_Steven.1
      • 5 mths ago
      • Reported - view

       👍

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

      Great Steve Thanks

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

       I have seen somewhere that can align the formulas vertically. ?

      • Ninox partner
      • RoSoft_Steven.1
      • 5 mths ago
      • Reported - view

      Searching the forum, I came across this treat : https://forum.ninox.com/t/35hrzfd

      I guess this is what you wanted?

    • Ninox partner
    • RoSoft_Steven.1
    • 5 mths ago
    • Reported - view

    for the sake of the forum, here's the solution (there were to many quotation marks)

    <span style=""color: black"">Cover: <br></span>
    <img src = ' " +
                i.ShareLink +
                " ' width='100' height='100'><br>"

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

       

Content aside

  • Status Answered
  • 5 mths agoLast active
  • 16Replies
  • 137Views
  • 2 Following