Python Forum
Use function, retry until valid
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use function, retry until valid
#3
Thanks for your support. The loop ends when the display Name respectively the name behind the provided string can be found in the directory. If it can be found then the username shall be used as variable instead of the search string variable

Example:
In a document there is „Peter Pan“ named as responsible (this will be taken over als string to the function)
Now the loop shall take a look for „Peter Pan“.

If it is found, the „Peter Pan“ (which is provided for the function) should be replaced with „peter.pan“ (which is the username not the display name, in the sense of a dictionary lookup“

If it is not found (e.g. due to a typo „Petr Pan“), the user can correct the name within this loop. If then the name is found, see above.

The input variable will be replaced with the variable from the dictionary string to proceed the next code lines with this username (e.g. to automatically assign tasks to this user name as it is provided and verified by the dictionary lookup)
Reply


Messages In This Thread
Use function, retry until valid - by Ashcora - Jan-05-2023, 10:18 AM
RE: Use function, retry until valid - by deanhystad - Jan-05-2023, 01:21 PM
RE: Use function, retry until valid - by Ashcora - Jan-05-2023, 03:13 PM
RE: Use function, retry until valid - by jefsummers - Jan-05-2023, 04:08 PM
RE: Use function, retry until valid - by Ashcora - Jan-05-2023, 04:18 PM
RE: Use function, retry until valid - by deanhystad - Jan-05-2023, 05:30 PM
RE: Use function, retry until valid - by Ashcora - Jan-05-2023, 09:19 PM
RE: Use function, retry until valid - by deanhystad - Jan-05-2023, 10:19 PM
RE: Use function, retry until valid - by Ashcora - Jan-06-2023, 10:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  is this a valid variable name? Skaperen 6 481 Jun-05-2024, 10:13 PM
Last Post: Skaperen
  Script getting reindexing only valid error cubangt 1 1,419 Dec-07-2023, 04:06 PM
Last Post: cubangt
  How to ignore "Retrying (Retry(total=2, connect=2, read=5, redirect=5, status=None))" const 3 2,977 Mar-26-2022, 08:55 AM
Last Post: ndc85430
  checking for valid hexadecimal digits Skaperen 3 6,765 Sep-02-2021, 07:22 AM
Last Post: buran
  requests_futures.sessions retry list of HTTP 429 Johanoosterwaal 0 1,637 Nov-20-2020, 09:23 PM
Last Post: Johanoosterwaal
  Retry After Exception Harshil 2 2,381 Aug-09-2020, 05:32 PM
Last Post: Harshil
  Limiting valid values for a variable in a class WJSwan 5 3,972 Jul-06-2020, 07:17 AM
Last Post: Gribouillis
  How to verify the give number is valid Mekala 3 2,566 May-16-2020, 02:40 PM
Last Post: anbu23
  C:\Windows\System32\appwiz.cpl is not a valid Win32 application Marceepoo 8 5,465 Mar-15-2020, 04:46 AM
Last Post: buran
  is a str object a valid iterator? Skaperen 6 5,953 Jan-27-2020, 08:44 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020