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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with another vari...
Power Apps
Unanswered

Help with another variable please

(0) ShareShare
ReportReport
Posted on by 1,625

Hi all,

 

On a screen (ReviewRequiredScreen) which is only navigated to if a Review is required, I have set up a label (LblManagerApproval) and its text property is:

DataCardValue163.Selected.Value //DataCardValue163 is dropdown with 'further review required', 'further review not required' as the 2 options

OnVisible of that screen (ReviewRequiredScreen) I have this this:

Set(ManagerOutcome, LblManagerApproval.Text)

Then on my FinalScreen, I have another field which collates the responses from the approvers and that field is set to this, where it will display 'further review required' OR 'further review not required' depending on what is selected:

If(IsBlank(ManagerOutcome),"N/A", ManagerOutcome)

My problem is when a Review is not needed and the user does not navigate to ReviewRequiredScreen, this will mean the N/A will never be set, so the status field on the FinalScreen will always be empty, as opposed to N/A

 

Any ideas how I get this N/A to appear?

Categories:
  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Hi @Lefty ,

    I may be missing something here, but where does "N/A" need to be "set" - in a field in the data or simply displayed somewhere?

  • Lefty Profile Picture
    1,625 on at

    hi @WarrenBelz 

     

    There isn't a requirement to have N/A written in the data source, but i presumed it would be if it gets written to the field.

    It needs to be written in a field please, as I will be using that when generating an email on the FinalScreen which currently isn't possible with my current set up 

  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Hi @Lefty ,

    I am still a little confused - I also responded to this post of yours which seems to be about much the same issue.

    What field do you need N/A set to - if you supply your Navigation options, it should be easy to set if you do not navigate to the Manager screen.

     

  • Lefty Profile Picture
    1,625 on at

    Hi @WarrenBelz 

     

    Yes the other question I have posted is a bit more detailed, where as this is more specifically trying to fix this issue. I've been told many times to log each question separately 🙂

    N/A needs to be written on a field in the FinalScreen, on DataCardValue38 which is a single line text field.

     

    My navigation code may be a bit long to put here, I will provide 1 screens code, but I have 4 approvers, each with different screens to navigate to, and any of of them can state Further approval required. E.G Approver1 has completed Approver1Screen, stated approval required, Approver2 later completes his section in Approver2Screen and sets the approval to not required, this changes the status column to Approver2 - No approval required, so i cannot use this status column, as the requirement is, if any of the 4 approvers stated approval required, it must navigate to an Further Approval screen. That was the thinking behind why the variables helped with this. 

    My question is now going into the other question I have logged, as there's no way of explaining this any further.
    But if all the 4 approvers stated No further approval required, the field on the FinalScreen (DataCardValue38 ) should then be set to N/A but it cannot use the status column as it will have changed from the time the first approver responded, sorry if I am not explaining my issue correctly.

    This is the code for the first approver screen, and navigates

    If(And(DataCardValue70.Value = true, vUser= MyTech), Navigate(ReviewRequiredScreen, Fade), Navigate(FinalScreen),
    If(And(vUser = "admin1" || vUser = "admin2"),
    //If(!IsBlank(MyTech), Navigate(TechScreen,Fade),
    If(!IsBlank(MYComm), Navigate(CommeScreen, Fade), 
    If(!IsBlank(MyBM), Navigate(BMScreen, Fade),
    If(!IsBlank(MyMaint), Navigate(MaintScreen, Fade),
    If(TechYes = "true", Navigate(ReviewRequiredScreen, Fade), Navigate(FinalScreen)) //TechYes is the variable created on TechScreen, where the toggle is set to true and this is only triggered if all the above reviewers are empty
    
    )))))

     

     

  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Thanks @Lefty ,

    I am guessing your requirements a bit here, but have a look at the below

    If(
     DataCardValue70.Value = true && vUser= MyTech, 
     Navigate(ReviewRequiredScreen, Fade), 
     //Navigate(FinalScreen), //you have too many If arguments (3) - this is the default end anyway
     If(
     vUser = "admin1" || vUser = "admin2",
     If(
     !IsBlank(MYComm), 
     Navigate(CommeScreen, Fade),
     If(
     !IsBlank(MyBM), 
     Navigate(BMScreen, Fade),
     If(
     !IsBlank(MyMaint),
     Navigate(MaintScreen, Fade),
     If(
     TechYes, 
     Navigate(ReviewRequiredScreen, Fade), 
     Navigate(FinalScreen);
     UpdateIf(
     YourDataSource,
     ID=YourRecordIDNumber //you will know where this is
     {YourNAField:"N/A"}
     )
     ) 
     )
     )
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Lefty Profile Picture
    1,625 on at

    @WarrenBelz 

     

    I see what You are doing here, nice.

    I've tried to change this but can't get it to work:

    UpdateIf(
     List,
     ID=vRecord //Not sure what else I would put here, as 
     {YourNAField:"N/A"} //tried typing in the field name but it doesnt find it, i presume this is the name of the SharePoint field name as opposed to the datacardvalue?

     

  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Ok @Lefty ,

    If the rest is OK all we have to do is find the right values for the field update.

    Firstly, you need to establish the record to be updated. ID is the most reliable, so if (for instance) you have selected the record from a gallery and the gallery is based on the list, then you could use 

    YourGalleryName.Selected.ID

    The rest is simply putting in the correct field name in the list and putting "N/A" in it.

    Does that help?

     

  • Lefty Profile Picture
    1,625 on at

    Thanks for the explanation @WarrenBelz  🙂

    I haven't changed the beginning of the code just tried adding in UpdateIf at the same stage in my code, I know your suggestion is better, but I'll be changing too many things to get my head around the new code you have provided.


    I'm not selecting the record from the gallery, but it can be selected, I have set the item to :

    Set(vRecord, ThisItem)

    But the record will normally be accessed via an email, deep linking.

    So i assumed  I could do:

    If(TechYes = "true", Navigate(ReviewRequiredScreen, Fade), Navigate(FinalScreen); 
    UpdateIf(ListName,ID=vRecord {SPOColumnName: "N/A"}
    
    ))))))))))

    But getting loads of errors

    • When I hover over the first Open bracket after UpdateIf I get Invalid number of arguments recieved 2 expecting 3 or more.
    • on the '=' between ID and vRecord, I get Invalid argument type
    • On the open curly brackets I get:curly.PNG

     

  • WarrenBelz Profile Picture
    156,738 Most Valuable Professional on at

    Thanks @Lefty , you are close

    If(
     TechYes = "true", 
     Navigate(ReviewRequiredScreen, Fade), 
     Navigate(FinalScreen); 
     UpdateIf(
     ListName,
     ID=vRecord.ID
     {SPOColumnName: "N/A"}
     )
    

    You could also do

    Set(vRecordID, ThisItem.ID)

    then

    If(
     TechYes = "true", 
     Navigate(ReviewRequiredScreen, Fade), 
     Navigate(FinalScreen); 
     UpdateIf(
     ListName,
     ID=vRecordID
     {SPOColumnName: "N/A"}
     )

     you just have to get the ID of the record into a Variable or (in the first case) extract the ID from the Record Variable.

    There is nothing wrong with the UpdateIF syntax.

    What you need to do is pull the code apart - put either bit above on a Button and see if it writes "N/A" to your record. Build the code "from the inside out" - don't write huge blocks of code and then try to work our where the error is - if the first bit works. wrap the next If statement around it and then keep going until you have the whole thing done.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Lefty Profile Picture
    1,625 on at

    Hi @WarrenBelz 

     

    Thanks heaps for helping with this, even though I can't get it to work, i'm learning from your suggestions.

    I've taken your suggestion and created another button, placed just the few lines of code, but I still am getting similar errors.

    Also I cannot use Thisitem - " Name isnt valid. The identified isnt recognized." I presume because its not a gallery?

    Hopefully you can spot why its not working I presume there is no way of getting this to work if based on my original post, the users do not navigate to a screen where the local variable is set?

    error2.pngerror1.png

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard