I am trying to create report from wizard
'form_data': self.read()[0]
What is [0] refer to in this code?
self.read() ==>read the current record?
I am trying to create report from wizard
'form_data': self.read()[0]
What is [0] refer to in this code?
self.read() ==>read the current record?
Hi Asmaa,
When you access self.read()[0], you are retrieving the first record in the list of records returned by self.read(). The index 0 indicates the position of the first record in the list.
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
0
maj 26
|
57 | |||
|
0
maj 26
|
48 | |||
|
0
maj 26
|
23 | |||
|
0
maj 26
|
20 | |||
|
0
maj 26
|
7 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
This is the full code:
and I'm asking why we putting [0] here?