0

Dynamic choice fields in prints/pdf fx field

I have a table: "PICKLIST", in which I store ZipCodes and other picklist stuff.

 

When using the records from PICKLIST in a Dynamic Choice field in a form, I can choose what field from the PICKLIST to show

 

But when I refer to the Dynamic Choice field in PRINTS/PDF (fx field) I only get the record ID from the PICKLIST

 

so instead of: "DK-2345 Copenhagen" (which is the record-content)  - I get:  "3"  (which is the record ID)

 

Hope it makes sense :)

 

Any ideas what syntax to use for this purpose in a fx field?

kr / John.

 

Screenshot 2021-10-27 at 15.06.54

Screenshot 2021-10-27 at 15.07.26

Screenshot 2021-10-27 at 15.07.58

9 replies

null
    • Fred
    • 2 yrs ago
    • Reported - view

    What is your code in the formula field?

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    record(Picklist,number(ZipCity).Topic

    Should do it.

    Steven

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    record(Picklist,number(ZipCity)).Topic

    missed a )

    • KAXIG ApS
    • John.1
    • 2 yrs ago
    • Reported - view

    Fred: my initial thought was that I would just need to refer to the two fields in the form, which lead to this:

    Companies.Address + "
    " + Companies.ZipCity

    What I believe should happen would be something like:

    Companies.Address + "
    " + Picklist.Topic where Picklist.ID = Companies.ZipCity

    - but no matter what I try, it won't work :-)

    Steven: when just imported into a fx field it doesn't work (for me,anyway :-)

    pls see enclosed

    Screenshot 2021-10-28 at 12.34.37

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    John,

    This will only work if you are in the table where the dynamic choice field is. Looking at your first screenshots, Your choice field is called ZipCity I suppose ? And the table where your values in the dropdown list, are coming from the table Picklist? And the field containing the data you want is Topic?

    Can you try your formula field in the right table? >>> record(Picklist,number(ZipCity)).Topic

    Steven

    • KAXIG ApS
    • John.1
    • 2 yrs ago
    • Reported - view

    Thanks for the effort 🙏 but I'm not really sure if we're on the same page, so to speak :))

    It's not easy for me to explain in words, so perhaps a model will do the job :)

     

    Screenshot 2021-10-29 at 07.55.13

    J-)

    • Nick_Massie
    • 2 yrs ago
    • Reported - view

    What is the table name of the dynamic choice?  This is what Stephan was asking.  In order to display the fields you will need to know the table that the ZipCity is receiving it informaton from.  The selection would then be 

    record(Picklist,number(ORIGINAL TABLE).Topic. The formula will not return from the field name of the Dynamic Choice..  In a Choice field that is possible.  

    • KAXIG ApS
    • John.1
    • 2 yrs ago
    • Reported - view

    Thanks Nick, the tablename of the dynamic choice is "Picklist" - The value from the field "TOPIC" (in Picklist) is shown in the field "Zip + City" inside the "Customer" table - so far so good - but when I want to print the values of the "Customer" table in a pdf, then the "Picklist, Topic" values is shown as "Picklist, ID" - which is illustrated above where the value"1234 Copenhagen" (TOPIC) is shown as "3" (ID).

    But if the value from a field in a Dynamic choice table can't be returned in the pdf of the target table, so to speak, then there is no point going down this road.

    Anyway, thanks for your effort guys 🙏

    J-)

    • KAXIG ApS
    • John.1
    • 2 yrs ago
    • Reported - view

    Guys, thanks for your patience.

     

    Don't know why I had a hard time getting my head around this - but finally, it sunk in 😂

     

    J-)

Content aside

  • 2 yrs agoLast active
  • 9Replies
  • 378Views