Select an element of choice dynamic in formula
In table TabA I have field 'Year' (field choice dynamic) which takes from table TabB the following data (field number):
2022
2023
2024
2025
2026
2027
2028
2029
In the taba table I have a button that creates a new record within the same table.
In the creation of the new record I would like to include a specific year, for example 2025.
I can’t do it!
I’ve tried them all
let a := 4
let new := create TabA
new.(Year := a)
let a := 2025
let new := create TabA
new.(Year := a)
let a := number(2025)
let new := create TabA
new.(Year := a)
let a :=record('TabB',4)
let new := create TabA
new.(Year := a)
ecc.
What is the right code?
Thank you!
6 replies
-
let y := number(Year); let c := (create TabA); c.(Year := y)
-
It is interesting that your last example didn’t work. What data was put in Year when you used it?
-
Fred
You're right, the last code does work , it takes always the same value from the TabB.(with ID 4)
My code takes the value from the current record in TabA where the button is pressed.
I must have read the question wrong.
Up to Web Name which code suites best for his case.
-
Fred RoSoft_Steven
Thank you for your interest!
I would like to take the data from the TabB.
And the record 4 corresponds to 2025.But the thing that leaves me puzzled is that the codes that I provided before, the first and the fourth, work perfectly.
This isn’t the first time that codes don’t work for a while. After a while they work. I can’t explain this!
Has that ever happened to you?
Content aside
- Status Answered
- 2 yrs agoLast active
- 6Replies
- 128Views
-
3
Following