Skip to main content

Notifications

Community site session details

Community site session details

Session Id : t1NKfnY3XO6CubQNOQxpxq
Power Apps - Microsoft Dataverse
Answered

global variables

Like (1) ShareShare
ReportReport
Posted on 31 Oct 2024 14:32:37 by 48
I am working on an app that I did not create but am trying to decipher.  I've found that the app uses Global Variables.  Can someone help me understand how this variable is doing what it does?  It creates a job number up to 99 when a new job is entered. I've screenshot the app page at the bottom. I need the job numbers to be allowed to go over 99.
 
Variable: Concatenate(Text(CustNumTemp),"-",Right(Text(Year(Now())),2),varJobNo)
 
My thoughts on what the variable does: 
Concatenate â€“ joins all of the following items into a text field
Text(CustNumTemp â€“ takes the information from the field CustNumTemp and enters it as text
"-" â€“ enters a dash
Right(Text(Year(Now())),2), - pulls the current year and enters it as a two-digit number
varJobNo â€“ enters the job number which is listed in numerical order from 1 to 99
Result:
When a user enters a new job on October 31, 2024 and chooses customer AAA with a customer number of 1000, and it is the 10th job for that customer this year, this variable will produce the following:  1000-24010.  The next job entered for this customer would be 1000-24011, and then 1000-24012, etc.  Each new customer gets a job number starting at 1 and moving to the maximum of 99, so the first job for customer BBB with a customer number of 1100 would get the job number 1100-24001.
This post is where my questions started.  View Column Formulas Previously Created  Thanks to all who helped with that one!
 
Any insight would be very appreciated!
 
Angi
 
  • AHILLCC Profile Picture
    48 on 31 Oct 2024 at 15:47:56
    global variables
    Goodness FLMike, I did not intend to offend you, and I do apologize.  This is actually another area of the app not the auto number column from my previous question.  Thank you for your response to it, which I mentioned in this thread as well. I also liked your response, which I thought would be a sufficient acknowledgement.  My previous question was answered prior to your response by Ankit, and that response was marked as the suggested answer.  
     
    I've found that if the original question gets off topic (view columns formulas previously created), it is suggested to start a new thread (global variables).  Perhaps I didn't make it clear that my previous question about the Customer Number column, and what could be producing its result, was answered.  This question is about a Job Number column that uses global variables.
     
    Again, my apologies, I do appreciate your expertise.  I hope your day improves.
  • Verified answer
    Michael E. Gernaey Profile Picture
    35,867 Super User 2025 Season 1 on 31 Oct 2024 at 15:20:09
    global variables
     is Hi
     
    My response doesn't change because you open a new question. Its not a formula, so its up to you to find all the locations where varJobNo is set to its value, whatever that is
     
    Do the following
     
    Open the app in edit mode.
    Once it is open, I want you to click the mouse in the grey area surround the "app" itself in the editor. Just the grey space/border around it, so that you are in global select mode (its automatic)
     
    Once you do that, do CTRL+F (for global find). In the left side, it will stop showing you the "code editor tree" and instead show a Find/Replace tab. In the find type varJobNo and click the search
     
    go through each location where it finds that by click on each line it finds, Note that if the code is part of some "hiearchy" it will show that hiearchy, so you only have to click the final line at the bottom of it.
     
    One of these is showing you HOW the variable is getting set to 1-99, although the code that is doing it, is what needs to change. So look for the Set(varJobNo ones
     
    This is how you need to find and change it to be more than 1-99
     
    Also if you don't respond to peoples posts, there is no incentive to keep posting and helping you as its rude.
     

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,369 Most Valuable Professional

Leaderboard

Featured topics

Loading started