Hello, I am working on a new request form (screenshot attached). I have it set up so that when the user selects a Project Number from the dropdown control, the Project Name and Program Mgr/Product Engr labels are automatically populated via LookUp formulas. I kept the underlying text input controls in the data cards so the selections could be written back to my SharePoint list.
The current Text formula for the Project Name label is:
LookUp('Project List','Project Number' = ddProjectNumber.Selected.'Project Number','Project Name')
The current Text formula for the Program Mgr/Product Engineer label is:
LookUp('Project List','Project Number' = ddProjectNumber.Selected.'Project Number','Project Owner'.DisplayName)
When the user first launches the form, I would like the Project Name and Program Mgr/Product Engr labels to be disabled and read “Auto-populates based on Project Number selection”. Once the user has selected something from the Project Number dropdown control, that message should be replaced with the results of the LookUp and the label should be read-only as they don't want them to allow them to edit the results. I tried a If(IsBlank type formula, but didn’t get very far since I am still new at this. Can you please help me develop the correct syntax? Let me know if you need any additional information.
The other thing I should mention is that the new request form is on a dedicated screen of its own. When the user selects an item from the gallery to view or edit, they are taken to a separate screen with multiple tabs. Do I still need to include some type of If(frmNewRequest.Mode = FormMode.New, FORMULA, Parent.Default) type syntax in all of my new request form fields? If so, can you help me incorporate that piece into the LookUp labels as well? Thanks in advance for your kind assistance. Teresa
Thank you Fausto. You are very kind.
Hi Teresa,
I'm happy to know I was able to assist in some way. Please, do not hesitate to reach out if you have questions or need help tackling a different issue.
Regards,
Hello Fausto,
The Project Name Update formula is txtValueProjectName.Text
The Program Manager/Product Engineer Update formula is dcPMPEValue.Selected
For some reason, these values only write back to the SharePoint list if I keep the original text input for Project Name. It's all working, even if it is not efficient as it could be so I hate to keep taking your time with it. I've set the Project Name and Program Manager fields to View so that only the Titles appear. As soon as they select something from the project number drop down. The fields auto-populate and the gallery is updated so I think we have achieved my primary goals.
I'm going to go ahead and mark your initial suggestion as the solution as I'm sure it is solid. Thanks so much for all the time you have spent helping me. I'm very grateful for the gift of your time. Have a nice evening and stay safe.
Teresa
Hi Fausto,
I was able to set the variable this time. Turns out I was missing a parenthesis. I changed my Program Manager/Product Engineer to a people picker control and am not seeing an error when I enter varProjectInfo into the Default property of the data card, but I haven't been able to test it yet as I am still getting errors in the Project Name fields. The purpose of the text input field is to write the Project Name back to the SharePoint list. I tried doing this based off of just a label and was not successful.
First, I tried entering varProjectInfo into the Text property of the label. I got this error.
Expected Text Value.lblProjectName.Text
I then tried entering varProjectInfo into the Default property of the text input and got this error.
Expected Text Value.txtValueProjectName.Default
Teresa
Hi Teresa,
No need to start a new thread. Since the app checker says there's an error in the formula, can you look at what the error is directly in the formula and then post it here? That way we know what the app is complaining about and fix it.
Regards.
Thank you Fausto. Do you have any thoughts on how I can achieve my original inquiry? If not, I'll mark your latest suggestion as a solution and will start a new ticket since this thread is getting long. Have a great day! Teresa
Hi Teresa,
Next thing I would try is to add a button and add the code to the button's OnSelect property. Then hard code an actual project number in the formula and see what that returns.
Hello Fausto,
Thanks for getting back to me. Since the On Change formula is throwing errors it isn't possible to execute it, nothing is happening. I checked the Variables and there is nothing registered at this point. Any suggestions of what I should try next?
Teresa
WarrenBelz
146,537
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,908
Most Valuable Professional