web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update Status Column b...
Power Apps
Unanswered

Update Status Column based on Date Selection and Text Input

(2) ShareShare
ReportReport
Posted on by 652
Hello,
 
I have below fields into form:
Group Column - consists of 2 dropdown (Group 1 and Group 2)
Invoice Date - Date Field
Invoice No - Text Input
Status - Text input
 
Below is my requirement:
  • If Invoice No is entered, update the text as Completed else Pending in Status column
  • If Invoice Date is entered, update the text as Completed else Pending in Status column
On Default property of Status column (which is DataCardValue10), I'm using below formula, but the status is always showing as Pending
If(Len(DataCardValue4.Text)=0,"Pending","Completed", If(IsBlank(DataCardValue15.SelectedDate),"Pending", "Completed"))
DataCardValue4 is Invoice No.
DataCardValue15 is Invoice Date.
 
Please advise with the correct formula. Thanks!
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    If Pending is your default (what you want it to be if the condition isn't met) and you want it to show Completed if you have an invoice number OR you have a invoice date, try this:

    If(DataCardValue4.Text <> "" Or !IsBlank(DataCardValue15.SelectedDate),
    "Completed",
    "Pending"
    )

    If this helps, please give it a like and mark it as an answer!
  • Prem4253 Profile Picture
    652 on at
     
    Does not seems to work as expected. All of the status are changing to Completed using your formula.
     
    Can you please advise with another logic as:
     
    1. If Group 1 is selected from Group dropdown, and it has a Invoice No. (Invoice Date can be blank), update the text as Completed else Pending
    2. If Group 2 is selected from Group dropdown, and it has a Invoice Date (Invoice No. can be blank), update the text as Completed else Pending
     
  • Verified answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    I would probably need to see a screenshot of your power app to completely understand what you're trying to do.  If "Group Column" is a Drop down with "Group 1" or "Group 2" as items and you want that incorporated in your logic just update what I gave you before.

    It could look something like:
    If(
    (GroupDropDown.Selected.Value = "Group 1" And DataCardValue4.Text <> "") Or 
    (GroupDropDown.Selected.Value = "Group 2" And !IsBlank(DataCardValue15.SelectedDate)),
    "Completed",
    "Pending"
    )


     
  • Prem4253 Profile Picture
    652 on at
     
    Thanks! working as Expected but only for the existing records which are entered.

    But when I click New (to add a new item) and if  Group 1 is selected from the drop down, the status automatically shows Completed, though we have not entered Invoice No.
  • Prem4253 Profile Picture
    652 on at
     
    It should be a simple logic, but not able to fix this from last 1 day
     
    If my - DataCardValue4 has any text / value -  than return text as Completed in DataCardValue10
     
    Similarly
     
    If my - DataCardValue15 has a date -  than return text as Completed in DataCardValue10
     
    I tried with below logic, but no luck. Every time something strange is happening with the formula.
    If(!IsBlank(DataCardValue4.Text),
     "Completed", "Pending",
     !IsBlank(DataCardValue15.SelectedDate),
     "Completed",
     "Pending"
    )
    And suggestions would be appreciated a much.
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at

    Is the Dropdown you're trying to work on a control you added to the app, or is it in a Form?  What's the name of the dropdown you're editing?

    Which property are you putting the expression into.
  • Prem4253 Profile Picture
    652 on at
     
    My dropdown is in the form named as drpbusiness, which has 2 options i.e. Group 1 and Group 2.
     
    I'm putting the expression into Default property of the Status Field (which is a text Input)
     
    For New button, below expression is added for OnSelect Property: (FormInspection is name of the form)
    ResetForm(FormInspection);NewForm(FormInspection);
    And for Submit button below expression is added:
    SubmitForm(FormInspection);
    Notify ("Please make sure all fields are filled in correctly ",NotificationType.Error,3000)
    Now when I click New button and select Group 1 from the drop down (drpbusiness), the status automatically shows Completed, though we have not entered Invoice No.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 759 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 310 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 228

Last 30 days Overall leaderboard