Where is Working Phase Lookup????
Hello,
I have a button that I need to create a new record for each work phase of car assistance. The button reporting the data of the customer and the car to be repaired. So far so good but I can't in any way select the value of the work phase that I have to insert in the new record!
The values of the work phase are linked with a table and selected through a combobox!
Here I report the code. I've tried them all and I don't know how to continue ...
let currentRow := this;
let newPhase:= number(currentRow.Phase.WorkSequence) + 1;
let newWorkPhase:= (select CarWorkingPhase)[WorkSequence= number(newPhase)];
(create CarAssistance).(
Customer:= currentRow.Clienti.ID;
CarRegistry := currentRow.CarRegistry.ID;
WorkingPhase = newWorkPhase
)
Thank you
4 replies
-
Fred Do you know solution for this problem? Thank You!
In the new created record the Field WorkingPhase is null. But newWorkPhase contains value!!!
If I use this formula, the desired value is not entered anyway.
let newPhase:= number(currentRow.Phase.WorkSequence) + 1; let newWorkPhase:= (select CarWorkingPhase)[WorkSequence= number(newPhase)]; (create CarAssistance).( Customer:= currentRow.Clienti.ID; CarRegistry := currentRow.CarRegistry.ID; WorkingPhase = newWorkPhase.ID )
How should I do?
-
Mauro Schiappelli said:
In the new created record the Field WorkingPhase is null. But newWorkPhase contains value!!!That was my first question. If you put:
let currentRow := this; let newPhase:= number(currentRow.Phase.WorkSequence) + 1; let newWorkPhase:= (select CarWorkingPhase)[WorkSequence= number(newPhase)]; concat(newWorkPhase)
in to a formula by itself, do you see the appropriate record Id from the CarWorkingPhase table?
Maybe you can try:
let newWorkPhase:= first((select CarWorkingPhase)[WorkSequence= number(newPhase)]);
Also I'm surprised the other reference fields fill in properly since ID is not what Ninox uses to refer to the record Id (note lowercase "d").
let currentRow := this; let newPhase:= number(currentRow.Phase.WorkSequence) + 1; let newWorkPhase:= (select CarWorkingPhase)[WorkSequence= number(newPhase)]; (create CarAssistance).( Customer:= currentRow.Clienti; CarRegistry := currentRow.CarRegistry; WorkingPhase = newWorkPhase )
If Clienti and CarRegistry are reference fields then there is no need to use Id you can just point to the reference field and Ninox will do the proper linking. That is why I'm wondering if you get a proper Ninox record Id in newWorkPhase.
Can you post a copy of your test DB?
Content aside
- 2 yrs agoLast active
- 4Replies
- 60Views
-
2
Following