0

display problem!

I have this formula to display data on a field...

let t := this;
(select Prix)[number(ID) = t.Achats.ID_prix_1].Prix

and it wont return something. It appear to not interpret the ID_prix_1 as number... but i use : ID_prix_1 := number(xxx) to fill it and if I use number(t.Achats.ID_prix_1) it wont return nothing...if I enter a value like:

let t := this;
(select Prix)[number(ID) = 8].Prix

it works perfect... any ideas?

thank you!

7 replies

null
    • BugTrapper
    • 4 yrs ago
    • Reported - view

    ID_prix_1:=Nr;

    instead of number(xxx) gives you the id number of the actual record.

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    Actually, I have a table called ''Achats''. In this table form, I have a field named ''ID_prix_1'' . I have a table field that is ''produits''. 

    When I select a product inside this table field, I have an on update formula that set the ID_prix_1 value to the ID of the product selected.  --> let t := this;
    let y := (select Prix)[number(Produits.ID) = number(t.Produits.ID) and actuel = true].ID;
    ID_prix_1 := number(concat(y))

    and in the display section, I tried to show the price of the product at the time he were selected.

    So, when I select a product, I get the actual price ID for this product. Then I use the display section to show this price --> let t := this;
    (select Prix)[number(ID) = t.Achats.ID_prix_1].Prix

     

    the display section is my problem... first the ID given is with a concat nor first function because it seem to ignore the actuel = true and give me multiple results... and in the display section it return nothing...

    hope it s better explained!

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    I even create a formula field with : (select Prix)[number(ID) = ID_prix_1].prix and it only return a value if I use first or last with the ID_prix_1 even if I enter a value manually in this number field...

    How can a number field can be considered as a multiple value... 

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    I use this formula inside a formula field : let t := this;
    (select Prix)[number(ID) = t.ID_prix_1].Prix

    it gives the right number...but, when in my table field, in the display formula, I enter : Achats.Formule that simply refer to the formula field, it gives me concatenate number...that correspond to all the number corresponding to the product...not just the one that correspond to the ID specified in the formula..pretty weird...

    any ideas?

    • BugTrapper
    • 4 yrs ago
    • Reported - view

    There is an example database 'Linktable' inside the webinar team.

    Maybe you take a look ?

    • plafontaine44
    • 4 yrs ago
    • Reported - view

    it seems that my table field called produits is inside my Achats form and from that, the display formula start from the Produits table. Anything I try to recover the Achats field seem not to work...it always gives me all the entry corresponding to the product ID... I even try to store the Achats ID inside a formula field and then use it to retrieve the ID_prix_1 value...but same results...

    all my table are composite from a main table so I can access all data within the main form...everything works well exept for that part!

    actually, I have a purchased that show a product with the price. To prevent the purchased filed to be updated if the product price changed, I use on update formula to enter the ID of the up to date price... (I use an actual field in the price table like: 10$   date   actual=false

                            20$  date2 actual=true

    so the actual price is 20$, if I change the price it would be set as false and the new entry to true...etc...

     

    it works well but in my product field, wich I select the purchased product in my purchased table...I will show the product name...price paid...and actual price.

    I can show actual price but the paid price is not working like explain in previous post...

    I continue to search solution!

    • Jorg
    • 4 yrs ago
    • Reported - view

    Hello,

    To give you a proper help it would be very helpful if we could see the formulae and the data model.

    A very good opportunity would for that is our webinar and it would be nice if you could bring up your question there.

     

    You can register here for the webinar, which takes place every Tuesday at 18 o'clock CEST: https://zoom.us/webinar/register/WN_zoSk2qyNSz6vLRFF1zlakg 

    Kind regards, Jörg

Content aside

  • 4 yrs agoLast active
  • 7Replies
  • 1818Views