I am really sorry to re-open this query, but the user has come back with additional requirements, in addition to looking for blank fields - which I now have the coding for (thank you) - they want the Stage updated where an Or statement is needed and also where the fields will not be empty before the data is entered.
The Data cards in question are DataCardValue7 (Choice) and DataCardValue23 (date and time). The choices for DataCardValue7 are 'Select an option', 'CD', ' IRA' and 'EIR'. DataCardValue23 is blank until the date is entered. DataCardValue7 will be completed before DataCardValue23 so the ticket may never reach DataCardValue23 . Should 'Select an Option' or 'CD' be entered or the date entered in to DataCardValue23 the Stage should be changed to 'Complete'.
I have tried to amend your coding to accommodate the new requirements but have been unsuccessful with whatever I try.
What I have done is add the following after 'Value = "Transferred"), ' and before the final ' Parent.Default)) '
Not((DataCardValue7.Selected.Value = "CD"), Lookup(Choices(AB12.Stage), Value = "Completed"),
((DataCardValue7.Selected.Value = "Select an option"), Lookup(Choices(AB12.Stage), Value = "Completed"),
I have tried making this an 'If / Or' statement but nothing is successful - I just get warning messages and the code is underlined in red.
I haven't tried adding DataCardValue23 into the formula yet - I think it sensible to work out how to do DataCardValue7 first.
Can anyone help me with this please?
BTW I am happy to open a new query if necessary.
If I understand your new need here: DataCardValue7 and DataCardValue23 are two new conditions for setting the staging field to Completed:
Is that it ?
Yes that is correct. I thought it would be a straightforward "if(or" statement but - well obviously - I can't work out how to do it.
BTW I am now working on what will hopefully be the production site so I will take your advice on board and label the data card values appropriately before I start the coding.
Ok, so the formula should now be:
If( SharePointForm1.Mode = FormMode.New, LookUp( Choices(AB12.Stage), Value = "New" ), SharePointForm1.Mode = FormMode.View, Parent.Default, SharePointForm1.Mode = FormMode.Edit, If( Not(IsBlank(DataCardValueTestCompletedBy.Text)), LookUp( Choices(AB12.Stage), Value = "Tested" ), Not(IsBlank(DataCardValueTransferredToFieldDate.SelectedDate)), LookUp( Choices(AB12.Stage), Value = "Transferred" ), DataCardValue7.Selected.Value = "Select an option" || DataCardValue7.Selected.Value = "CD" || Not(IsBlank(DataCardValue23.SelectedDate)), LookUp( Choices(AB12.Stage), Value = "Completed" ), Parent.Default ) )
I haven't tested it though...
"...I will take your advice on board and label the data card values appropriately..." 👍👌👏
Thank you for your coding suggestion but I'm afraid that I get error messages - The "function 'If' has some invalid arguments", "Invocation of unknown or unsupported arguments" and "The function 'IsBlank' has some invalid arguments".
It is the ||Not(IsBlank(DataCardValue23.SelectedDate)) which is causing the error - when I blank it out that section of the coding I get no error warnings however the value does not update to "Complete" when it should. I have attached a screen grabs of both sets of coding (with and without blocked out coding).
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
The largest Power BI, Power Platform, and Data conference in New Zealand