I have two SQL tables (image SQL Tables) Project and ProjectDesign. Project is the parent table and Project can have many ProjectDesigns. I'm trying to create a form with data from both of these tables. First question, can I use a regular edit form and add the textboxes, labels, etc independently to the form? If so, what would the code for the DataSource and item be?
Second question, currently I just independently added textboxes, data picker, etc to a screen and setup to look like a form and have a submit button with a code which is attachment called code and I'll post the code too. This code allows me to submit to both tables Project and ProjectDesign. However, I'm having trouble with showing the data from what is submitted. The RequestListScreen has a gallery and I currently have the Items as "SortByColumns(Filter(ReqView,StartsWith(PD,PDSearchBox_3.Text),StartsWith(PD,WOFilterText.Text)),"CreatedDate",SortOrder.Descending)." ReView is actually a view from SQL statement I created so I can see all the data that has been submitted. This isn't what I want. I need to be able to edit the data as well and view doesn't allow you to edit. I'm trying Collect to get the data from both tables Project and ProjectDesign but it is showing duplicate (see RequestListScreen image). The code is shown in the image RequestListScreen for the gallery. The gallery Item is collection name: "RequestList". I have a button to get the data in the collection: "Collect(RequestList,ShowColumns(Project,"PD","ProjectDesc","SummerCritical","SummerCriticalDate"),ShowColumns(ProjectDesign,"TEDDesign","WorkOrder","Department","Area","FirstCutDate","FinalSwitchingDate","AirportLocation","ConfigurationChanges","Requestor","RequestorPhone","RequestorDesc","CreatedDate","ModifiedDate"));". With this code, its showing duplicate data. Can someone help me with the codes?
I also have another screen called ViewFormScreen. This is where from the gallery in the RequestListScreen, the user will be able to select the edit icon to edit that record. The code for the edit icon is "Set(ExistingPD, ThisItem);ResetForm(ViewForm);EditForm(ViewForm);Navigate(ViewFormScreen)". In the ViewFormScreen, I have a form with the Item set to "ExistingPD", and I have the Datasource as the collection name "RequestList". This isn't showing all the data on the form within the collection. The form isn't made independently. I actually used the edit form to view the data from the gallery. From the ViewFormScreen I'm trying to edit and save the record back to Project and ProjectDesign but I can't. The formula that I have to save back to the collection is "Patch(
RequestList,
requestGallery_3.Selected,
{
PD:PDTextInput,ProjectDesc:ProjDescTextInput1,SummerCritical:SCToggle,SummerCriticalDate:SCDate2,TEDDesign:TEDTextInput1,WorkOrder:WOTextInput1,Department:DeptDP1,Area:AreaDP1, FirstCutDate:FCDate, FinalSwitchingDate:FSDate,AirportLocation:ALToggle1,ConfigurationChanges:CCToggle1,Requestor:ReqTextInput1,RequestorPhone:PhTextInput1,MapStatus:StatusDP1,CreatedDate:CreatedDate,ModifiedDate:ModifiedDate,RequestorDesc:DescTextInput1
}
);
Navigate(RequestListScreen);".
Can someone help me with this code as well.