Hey guys,
I have the following form:
On submit, if insert to the dB is successful, the following page will show:
As you can see, there's some weird behavior happening on the table. All the records should be on the same row, but they each have their own row. The table is populated from a collection that is generated from the LastSubmit on the form. Here is the formula I am using:
ClearCollect(LastNewEmployee,Table({LastName: AddNewEmployee.LastSubmit.LastName},{FirstName: AddNewEmployee.LastSubmit.FirstName},{JobId: AddNewEmployee.LastSubmit.JobId},{HireDate: AddNewEmployee.LastSubmit.DateofHire},{SupervisorId: AddNewEmployee.LastSubmit.SupervisorId},{LocationId: AddNewEmployee.LastSubmit.LocationId}));
Any ideas what's wrong? Am I missing something obvious?
Solved! Go to Solution.
Hi @stephenkln
ClearCollect(LastNewEmployee,Table(
{LastName: AddNewEmployee.LastSubmit.LastName},
{FirstName: AddNewEmployee.LastSubmit.FirstName},
{JobId: AddNewEmployee.LastSubmit.JobId},
{HireDate: AddNewEmployee.LastSubmit.DateofHire},
{SupervisorId: AddNewEmployee.LastSubmit.SupervisorId},
{LocationId: AddNewEmployee.LastSubmit.LocationId}));
Each { } pair is a row of data - to submit one row encapsulate all fields in one { } pair.
ClearCollect(LastNewEmployee,Table(
{
LastName: AddNewEmployee.LastSubmit.LastName,
FirstName: AddNewEmployee.LastSubmit.FirstName,
JobId: AddNewEmployee.LastSubmit.JobId,
HireDate: AddNewEmployee.LastSubmit.DateofHire,
SupervisorId: AddNewEmployee.LastSubmit.SupervisorId,
LocationId: AddNewEmployee.LastSubmit.LocationId
}));
Hope this helps,
RT
Hi @stephenkln
ClearCollect(LastNewEmployee,Table(
{LastName: AddNewEmployee.LastSubmit.LastName},
{FirstName: AddNewEmployee.LastSubmit.FirstName},
{JobId: AddNewEmployee.LastSubmit.JobId},
{HireDate: AddNewEmployee.LastSubmit.DateofHire},
{SupervisorId: AddNewEmployee.LastSubmit.SupervisorId},
{LocationId: AddNewEmployee.LastSubmit.LocationId}));
Each { } pair is a row of data - to submit one row encapsulate all fields in one { } pair.
ClearCollect(LastNewEmployee,Table(
{
LastName: AddNewEmployee.LastSubmit.LastName,
FirstName: AddNewEmployee.LastSubmit.FirstName,
JobId: AddNewEmployee.LastSubmit.JobId,
HireDate: AddNewEmployee.LastSubmit.DateofHire,
SupervisorId: AddNewEmployee.LastSubmit.SupervisorId,
LocationId: AddNewEmployee.LastSubmit.LocationId
}));
Hope this helps,
RT
Do you want to put the last Submit in the Collection;
ClearCollect(LastNewEmployee,{LastName: AddNewEmployee.LastSubmit.LastName,FirstName: AddNewEmployee.LastSubmit.FirstName,JobId: AddNewEmployee.LastSubmit.JobId,
HireDate: AddNewEmployee.LastSubmit.DateofHire,SupervisorId: AddNewEmployee.LastSubmit.SupervisorId,
LocationId: AddNewEmployee.LastSubmit.LocationId})
Am assuming the form name is AddNewEmployee
An alternative is to get the Data from the Table because it contains the submitted data;
ClearCollect(LastNewEmployee, Table1)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
User | Count |
---|---|
183 | |
105 | |
89 | |
44 | |
44 |
User | Count |
---|---|
226 | |
107 | |
106 | |
68 | |
67 |