0

Photo field alignment

Hello,

a photo field is always aligned on the left when laying out a view. I need to have more fields on its left or even a space to center it on the page. Is there a way to do it?

Thank oyu very much

31 replies

null
    • Sean
    • 3 yrs ago
    • Reported - view

    Blued,

    When you get the chance, please copy and paste the formula you are using here.

    • Blued
    • 3 yrs ago
    • Reported - view

    Hi Sean,

     

    here is the formula

    let x := anello.ID;
    html("<img src=""/Users/Vittorio/Library/Containers/de.ninoxdb.ninox-mac.Ninox/Data/Documents/data/'All Ery'/files/" + extractx(text(files(record(Anagrafica,x))), "(\w)(.+)", "$1/$2") + """>")

    here is the result when I am removing the html() function:

    <img src="/Users/Vittorio/Library/Containers/de.ninoxdb.ninox-mac.Ninox/Data/Documents/data/'All Ery'/files/A/390/m_a.jpeg">

    • Sean
    • 3 yrs ago
    • Reported - view

    Hi Blued,

     

    I am baffled. Everything looks good so all I can do is swing in the dark.

     

    Is anello.ID the same as link.ID?

    Is it referring to another table?

    How many tables do you have?

    Remember, the letter in the file path is the table Id and the number is the record Id. Is the image in that file path in record 390 of your first table?

     

    I am unable to think of anything else at the moment.

    • Blued
    • 3 yrs ago
    • Reported - view

    Hi Sean,

     

    anello.ID is from the same table of the picture and it identifies the record itself for selection.

    I only have one table. A/390 are the table and the record of which I want to show the picture, selection is working fine.

     

    Thank you very much for all your support so far.

     

    P.S. back to initial question: why image fields are always moved to the very left of the screen as first field and no other object (e.g. formula field, space, text field, etc.) can be placed before them?

    • Sean
    • 3 yrs ago
    • Reported - view

    I don't know how anello.ID works, but if you're getting the result you want then that's what matters. I'm not clear on whether you got it working or not... "selection is working fine". Does that just mean you can click on it and it brings up the picture viewer?

     

    As far as the reason goes, I can't explain it any better than this...

     

    https://ninox.com/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/image-field-position-6001660c0ece7f6010221ca5?post=6002e2560ece7f6010221cfb&page=1

    • Sean
    • 3 yrs ago
    • Reported - view

    Yeah, I don't see how you can use dot notation like that unless you are using a Reference field and that would mean you have more than one table in your database. Also, if you do use a Reference field and you want to return the Id then you would need to put it inside first(), last() or concat().

Content aside

  • 3 yrs agoLast active
  • 31Replies
  • 2682Views